Thursday, September 23, 2010

Rename multiple files in Linux

Lets' change all files with extension ‘.html’ to ‘.php’.

Rename all *.html files in one folder

rename

#rename .html .php *.html



Do the same operation recursively in a directory tree

find . -name "*.html" -exec rename .html .php {} \;

Those double quotes around *.info are important



If you want to be expert go to following link and don't forget to read all the comments :)
http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/

No comments: