Is there any way of batch renaming files in sub directories?
For example:
Rename *.html
to *.htm
in a folder which has directories
For Windows, I've made a convenient litte VBScript solution with regex-based renaming and Drag&Drop support. Give it a try if you like - put it in a vbs file and drop your folder on it in Explorer.
find . -regex ".*html$" | while read line;
do
A=`basename ${line} | sed 's/html$/htm/g'`;
B=`dirname ${line}`;
mv ${line} "${B}/${A}";
done
In Bash, you could do the following:
for x in $(find . -name \*.html); do
mv $x $(echo "$x" | sed 's/\.html$/.htm/')
done
On Windows, you can find out opensource simple C# bulk file renamer application in https://filerenamer.codeplex.com works with a simple excel file. Give an excel file with two columns source and destination to this application and it's done.
If you have forfiles (it comes with Windows XP and 2003 and newer stuff I think) you can run:
forfiles /S /M *.HTM /C "cmd /c ren @file *.HTML"
On Linux, you may use the 'rename' command to rename files in batch.