Re: change all files names to lower case.
- Posted by petelomax Aug 29, 2014
- 1368 views
sergelli said...
So, it worked. Does anyone have a better idea?
The only thing I'd change would be to test for when the double rename is necessary, then again the code posted seems to rename things that are already lowercase. Personally, I'd write a shim (completely untested):
procedure rename(sequence d, sequence oldname, sequence newname) if not equal(newname,oldname) then if equal(lower(oldname),lower(newname)) then moveFile(d&oldname,d&oldname&'1') oldname&='1' end if moveFile(d&oldname,d&newname) end if end procedure
Pete