View Single Post
Old 02-06-2004, 09:15 AM  
blazin
Confirmed User
 
Join Date: Aug 2002
Posts: 2,781
Quote:
Originally posted by com
execute:

cd /path/to/folder; ls -al | grep JPG | awk '{print $9, $9}' >shit && vi shit

in vi hit escape, delete the top two lines (should be "." and "..", these can be deleted by hitting "d" twice, followed by shift-colon, at the colon prompt enter this sequence:

%s/^/mv /g

enter after that, simply change the second colum to have lower case jpg at the end. escape back to shell and save by hitting escape shift-colon and at the prompt enter:

wq!

at the prompt execute:

sh shit

I would explain how to do it for all files etc... but that's getting a bit tricky and wouldnt want to do so without seeing the file structure myself. be careful!
Nice sledgehammer for a little nut
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote