[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: script to convert filename to lowercase



>>>>> Darryl Röthering (DR) writes:

 DR> Can one of you gurus quickly help me with a script? I have a
 DR> directory with several thousand files named inconsistently with a
 DR> mix of uppercase and lowercase. I need to rationalize these to be
 DR> named with all lowercase. I know you guys will have a dozen ways
 DR> to do this.

ls | awk '{ fn = tolower($0); if ($0 != fn) { cmd = "mv " $0 " " fn; system(cmd); } }'

-- 
Alexander Zhuckov   zuav@int.spb.ru   2:5030/518.50



Reply to: