Changing file names in a directory
Thursday, July 15th, 2004Here I am changing a whole directory of file names. I am changing the extension of any file with the .tif extension to .jpg.
ls *.jpg | awk ‘{print(”mv “$1″ “$1)}’ | sed ’s/.jpg/.tif/2′ | /bin/sh
Of course you can change the sed regular expression to change it to whatever you want to change the file names […]