[Israel.pm] Fix case in a directory structure

Micha mickey75 at gmail.com
Thu Feb 7 11:37:20 PST 2013


One tool I really like is zsh's zmv:

# rename files to be lower-cased
zmv '*' '${(L)f}'

# same, but also replace spaces with underscores
# (as suggested by Chanan, I really hate spaces in file names)
zmv '*' '${(L)f:gs/ /_}'

and it can do much more than just that.

on Windows use it under Cygwin and you should be fine.

HTH.

Cheers,
Micha


On Wed, Feb 6, 2013 at 9:24 AM, Chanan Berler <bc.other at gmail.com> wrote:

> 1) rename all files to be compatible and replace 'space' with _  or use
> "file name" - not my best offer
> 2) use lc so all file names were lowercase - prefered
>
>
> On Mon, Feb 4, 2013 at 11:43 AM, Gabor Szabo <gabor at szabgab.com> wrote:
>
>> Hi,
>>
>> given a web site that was developed on a Windows machine with case
>> insensitive
>> filesystem. The files are in mixed case:
>>
>> Index.html
>> Big Banner.jpg
>> Background IMAGE.PNG
>>
>>
>> It works on Windows, but when uploaded to Linux the pages are broken
>> as the case
>> of the images files don't match the case as they are used inside the
>> .html files.
>>
>> Any suggestions how to fix this?
>>
>> Is there a tool out there to fix this?
>>
>> Is there a Perl script for this?
>>
>> Gabor
>> _______________________________________________
>> Perl mailing list
>> Perl at perl.org.il
>> http://mail.perl.org.il/mailman/listinfo/perl
>>
>
>
>
> --
> ===================
> ----     Chanan Berler    ----
> ===================
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://mail.perl.org.il/mailman/listinfo/perl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20130207/7b37d6a6/attachment.htm 


More information about the Perl mailing list