File Name case check

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Al Kolff

    #1

    File Name case check

    Hi,
    Has anyone come across a utility to check the case of a filename versus a
    php page? I develop locally on a windows machine (Know Know) then upload to
    a Linux and everything works usually works fine. But I sure would like to
    eliminate this headache.

    --
    God Bless you,
    Al Kolff



  • Andy Hassall

    #2
    Re: File Name case check

    On Tue, 12 Jul 2005 19:57:32 GMT, "Al Kolff" <alkolff@spam.s ucks.earthlink. net>
    wrote:
    [color=blue]
    >Has anyone come across a utility to check the case of a filename versus a
    >php page?[/color]

    What do you mean?
    [color=blue]
    >I develop locally on a windows machine (Know Know) then upload to
    >a Linux and everything works usually works fine. But I sure would like to
    >eliminate this headache.[/color]

    I don't understand what headache you are having.

    Personally, I always use lowercase filenames, and so don't need to worry about
    case-insensitive filesystems.

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Al Kolff

      #3
      Re: File Name case check


      "Andy Hassall" <andy@andyh.co. uk> wrote in message
      news:sea8d156h8 dsn66b2nmefa0hh j6jttuact@4ax.c om...[color=blue]
      > On Tue, 12 Jul 2005 19:57:32 GMT, "Al Kolff"[/color]
      <alkolff@spam.s ucks.earthlink. net>[color=blue]
      > wrote:
      >[color=green]
      > >Has anyone come across a utility to check the case of a filename versus a
      > >php page?[/color]
      >
      > What do you mean?
      >[color=green]
      > >I develop locally on a windows machine (Know Know) then upload to
      > >a Linux and everything works usually works fine. But I sure would like to
      > >eliminate this headache.[/color]
      >
      > I don't understand what headache you are having.
      >
      > Personally, I always use lowercase filenames, and so don't need to worry[/color]
      about[color=blue]
      > case-insensitive filesystems.
      >
      > --
      > Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      > <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool[/color]

      Andy,
      I also usually use all lowercase file names. But, I down loaded the
      ISchoolAd scripts.
      and in some pages the filenames are capitalized and in others they are not.
      Same for folder names. Same for filenames.
      Because I loaded and checked it on my Windows machine it worked fine .When I
      uploaded it to the Linux based server there have been all kinds of
      interesting things going on. So I thought someone else must have had the
      same problem. And maybe they had written a search and replace that compared
      file/folder names with scripts and corrected or highlighted them.
      al



      Comment

      • SOR

        #4
        Re: File Name case check

        <comp.lang.ph p , Al Kolff , alkolff@spam.su cks.earthlink.n et>
        <kZXAe.2562$dU3 .1802@newsread2 .news.pas.earth link.net>
        <Tue, 12 Jul 2005 23:01:36 GMT>
        [color=blue]
        > I also usually use all lowercase file names. But, I down loaded the
        > ISchoolAd scripts.
        > and in some pages the filenames are capitalized and in others they are not.
        > Same for folder names. Same for filenames.
        > Because I loaded and checked it on my Windows machine it worked fine .When I
        > uploaded it to the Linux based server there have been all kinds of
        > interesting things going on. So I thought someone else must have had the
        > same problem. And maybe they had written a search and replace that compared
        > file/folder names with scripts and corrected or highlighted them.
        >[/color]

        It doesnt sound too hard to write .

        - find a php display folders loop like the one on www.phpemail.co.uk and
        adapt it to suit

        - grab the filename of each file

        - check for uppercase characters

        - change to lowercase if needed and edit/save the filename

        Somebody more experienced can tell you how to 'also' check the sub
        folders if you want to do it that way .

        Comment

        • Al Kolff

          #5
          Re: File Name case check


          "SOR" <webmaster@spar esorrepair.co.u k.INVALID> wrote in message
          news:MPG.1d3e86 7e1879a024989cf 9@no-cancel.newsread er.com...[color=blue]
          > <comp.lang.ph p , Al Kolff , alkolff@spam.su cks.earthlink.n et>
          > <kZXAe.2562$dU3 .1802@newsread2 .news.pas.earth link.net>
          > <Tue, 12 Jul 2005 23:01:36 GMT>
          >[color=green]
          > > I also usually use all lowercase file names. But, I down loaded the
          > > ISchoolAd scripts.
          > > and in some pages the filenames are capitalized and in others they are[/color][/color]
          not.[color=blue][color=green]
          > > Same for folder names. Same for filenames.
          > > Because I loaded and checked it on my Windows machine it worked fine[/color][/color]
          ..When I[color=blue][color=green]
          > > uploaded it to the Linux based server there have been all kinds of
          > > interesting things going on. So I thought someone else must have had the
          > > same problem. And maybe they had written a search and replace that[/color][/color]
          compared[color=blue][color=green]
          > > file/folder names with scripts and corrected or highlighted them.
          > >[/color]
          >
          > It doesnt sound too hard to write .
          >
          > - find a php display folders loop like the one on www.phpemail.co.uk and
          > adapt it to suit
          >
          > - grab the filename of each file
          >
          > - check for uppercase characters
          >
          > - change to lowercase if needed and edit/save the filename
          >
          > Somebody more experienced can tell you how to 'also' check the sub
          > folders if you want to do it that way .
          >[/color]

          I'm trying to do that right now and if I get it to work I'll upload to one
          of the script sharing sites. Till then I had a flash - Why not just put two
          copies of the file in the folder with different Test.gif and test.gif. It
          sure isn't elegant but it works for now till I get the code cleaned up.

          Thanks for the suggestion it kick started my brain.
          al


          Comment

          • Shelly

            #6
            Re: File Name case check


            "Al Kolff" <alkolff@spam.s ucks.earthlink. net> wrote in message
            news:ICkBe.3146 $dU3.1207@newsr ead2.news.pas.e arthlink.net...[color=blue]
            >
            > "SOR" <webmaster@spar esorrepair.co.u k.INVALID> wrote in message
            > news:MPG.1d3e86 7e1879a024989cf 9@no-cancel.newsread er.com...[color=green]
            >> <comp.lang.ph p , Al Kolff , alkolff@spam.su cks.earthlink.n et>
            >> <kZXAe.2562$dU3 .1802@newsread2 .news.pas.earth link.net>
            >> <Tue, 12 Jul 2005 23:01:36 GMT>
            >>[color=darkred]
            >> > I also usually use all lowercase file names. But, I down loaded the
            >> > ISchoolAd scripts.
            >> > and in some pages the filenames are capitalized and in others they are[/color][/color]
            > not.[color=green][color=darkred]
            >> > Same for folder names. Same for filenames.
            >> > Because I loaded and checked it on my Windows machine it worked fine[/color][/color]
            > .When I[color=green][color=darkred]
            >> > uploaded it to the Linux based server there have been all kinds of
            >> > interesting things going on. So I thought someone else must have had
            >> > the
            >> > same problem. And maybe they had written a search and replace that[/color][/color]
            > compared[color=green][color=darkred]
            >> > file/folder names with scripts and corrected or highlighted them.
            >> >[/color]
            >>
            >> It doesnt sound too hard to write .
            >>
            >> - find a php display folders loop like the one on www.phpemail.co.uk and
            >> adapt it to suit
            >>
            >> - grab the filename of each file
            >>
            >> - check for uppercase characters
            >>
            >> - change to lowercase if needed and edit/save the filename
            >>
            >> Somebody more experienced can tell you how to 'also' check the sub
            >> folders if you want to do it that way .
            >>[/color]
            >
            > I'm trying to do that right now and if I get it to work I'll upload to one
            > of the script sharing sites. Till then I had a flash - Why not just put
            > two
            > copies of the file in the folder with different Test.gif and test.gif. It
            > sure isn't elegant but it works for now till I get the code cleaned up.
            >
            > Thanks for the suggestion it kick started my brain.
            > al[/color]

            How about
            strtolower -- Make a string lowercase

            Also, there is the string comparison ignoring case.

            Shelly


            Comment

            • Al Kolff

              #7
              Re: File Name case check


              "Shelly" <sheldonlg.news @asap-consult.com> wrote in message
              news:xJWdnTBlZv yLfkjfRVn-iA@comcast.com. ..[color=blue]
              >
              > "Al Kolff" <alkolff@spam.s ucks.earthlink. net> wrote in message
              > news:ICkBe.3146 $dU3.1207@newsr ead2.news.pas.e arthlink.net...[color=green]
              > >
              > > "SOR" <webmaster@spar esorrepair.co.u k.INVALID> wrote in message
              > > news:MPG.1d3e86 7e1879a024989cf 9@no-cancel.newsread er.com...[color=darkred]
              > >> <comp.lang.ph p , Al Kolff , alkolff@spam.su cks.earthlink.n et>
              > >> <kZXAe.2562$dU3 .1802@newsread2 .news.pas.earth link.net>
              > >> <Tue, 12 Jul 2005 23:01:36 GMT>
              > >>
              > >> > I also usually use all lowercase file names. But, I down loaded the
              > >> > ISchoolAd scripts.
              > >> > and in some pages the filenames are capitalized and in others they[/color][/color][/color]
              are[color=blue][color=green]
              > > not.[color=darkred]
              > >> > Same for folder names. Same for filenames.
              > >> > Because I loaded and checked it on my Windows machine it worked fine[/color]
              > > .When I[color=darkred]
              > >> > uploaded it to the Linux based server there have been all kinds of
              > >> > interesting things going on. So I thought someone else must have had
              > >> > the
              > >> > same problem. And maybe they had written a search and replace that[/color]
              > > compared[color=darkred]
              > >> > file/folder names with scripts and corrected or highlighted them.
              > >> >
              > >>
              > >> It doesnt sound too hard to write .
              > >>
              > >> - find a php display folders loop like the one on www.phpemail.co.uk[/color][/color][/color]
              and[color=blue][color=green][color=darkred]
              > >> adapt it to suit
              > >>
              > >> - grab the filename of each file
              > >>
              > >> - check for uppercase characters
              > >>
              > >> - change to lowercase if needed and edit/save the filename
              > >>
              > >> Somebody more experienced can tell you how to 'also' check the sub
              > >> folders if you want to do it that way .
              > >>[/color]
              > >
              > > I'm trying to do that right now and if I get it to work I'll upload to[/color][/color]
              one[color=blue][color=green]
              > > of the script sharing sites. Till then I had a flash - Why not just put
              > > two
              > > copies of the file in the folder with different Test.gif and test.gif.[/color][/color]
              It[color=blue][color=green]
              > > sure isn't elegant but it works for now till I get the code cleaned up.
              > >
              > > Thanks for the suggestion it kick started my brain.
              > > al[/color]
              >
              > How about
              > strtolower -- Make a string lowercase
              >
              > Also, there is the string comparison ignoring case.
              >
              > Shelly
              >
              >[/color]

              Thank you! That will make it work I think.
              al


              Comment

              • Hilarion

                #8
                Re: File Name case check

                > I had a flash - Why not just put two copies of the file in the folder[color=blue]
                > with different Test.gif and test.gif.[/color]

                You could use soft or hard linking. It's transparent for Apache and
                this way you will not end up having "Test.gif" and "test.gif" being
                different pictures.

                Hilarion

                Comment

                Working...