Making all files lowercase

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: sinck@corp.quepasa.com
Dátum:  
Tárgy: Making all files lowercase

Ok, just because I can, here's the perl solution I use for exactly
this purpose. It doesn't use the handy tmp dir that JLF uses, but
I've used it and expect it to replace/clobber files in the cwd.

It works for me, but YMMV. :-)


------------------
# down cases the names
opendir(UP,".");
@names=readdir(UP);
closedir(UP);
while ($name=shift(@names))
{
    next if (($name =~ /^[\.]{1,2}/) || ("\L$name" eq $name));
    system ("mv $name \L$name\n");
}
exit 0;
------------------


That test keeps it from trying to lowercase dot-files and from converting
already lowercase files to lowercase.

David