Connecting Tech Pros Worldwide Help | Site Map

File Name case check

Al Kolff
Guest
 
Posts: n/a
#1: Jul 17 '05
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
Guest
 
Posts: n/a
#2: Jul 17 '05

re: File Name case check


On Tue, 12 Jul 2005 19:57:32 GMT, "Al Kolff" <alkolff@spam.sucks.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.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Al Kolff
Guest
 
Posts: n/a
#3: Jul 17 '05

re: File Name case check



"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:sea8d156h8dsn66b2nmefa0hhj6jttuact@4ax.com...[color=blue]
> On Tue, 12 Jul 2005 19:57:32 GMT, "Al Kolff"[/color]
<alkolff@spam.sucks.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.andyhsoftware.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



SOR
Guest
 
Posts: n/a
#4: Jul 17 '05

re: File Name case check


<comp.lang.php , Al Kolff , alkolff@spam.sucks.earthlink.net>
<kZXAe.2562$dU3.1802@newsread2.news.pas.earthlink. 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 .

Al Kolff
Guest
 
Posts: n/a
#5: Jul 17 '05

re: File Name case check



"SOR" <webmaster@sparesorrepair.co.uk.INVALID> wrote in message
news:MPG.1d3e867e1879a024989cf9@no-cancel.newsreader.com...[color=blue]
> <comp.lang.php , Al Kolff , alkolff@spam.sucks.earthlink.net>
> <kZXAe.2562$dU3.1802@newsread2.news.pas.earthlink. 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


Shelly
Guest
 
Posts: n/a
#6: Jul 17 '05

re: File Name case check



"Al Kolff" <alkolff@spam.sucks.earthlink.net> wrote in message
news:ICkBe.3146$dU3.1207@newsread2.news.pas.earthl ink.net...[color=blue]
>
> "SOR" <webmaster@sparesorrepair.co.uk.INVALID> wrote in message
> news:MPG.1d3e867e1879a024989cf9@no-cancel.newsreader.com...[color=green]
>> <comp.lang.php , Al Kolff , alkolff@spam.sucks.earthlink.net>
>> <kZXAe.2562$dU3.1802@newsread2.news.pas.earthlink. 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


Al Kolff
Guest
 
Posts: n/a
#7: Jul 17 '05

re: File Name case check



"Shelly" <sheldonlg.news@asap-consult.com> wrote in message
news:xJWdnTBlZvyLfkjfRVn-iA@comcast.com...[color=blue]
>
> "Al Kolff" <alkolff@spam.sucks.earthlink.net> wrote in message
> news:ICkBe.3146$dU3.1207@newsread2.news.pas.earthl ink.net...[color=green]
> >
> > "SOR" <webmaster@sparesorrepair.co.uk.INVALID> wrote in message
> > news:MPG.1d3e867e1879a024989cf9@no-cancel.newsreader.com...[color=darkred]
> >> <comp.lang.php , Al Kolff , alkolff@spam.sucks.earthlink.net>
> >> <kZXAe.2562$dU3.1802@newsread2.news.pas.earthlink. 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


Hilarion
Guest
 
Posts: n/a
#8: Jul 17 '05

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
Closed Thread