Shell batch rename

I have a large number of files with suffix *.txt.orig, and would like to rename them to *.orig.txt. Is there a batch move utility in the user land that would batch move files from the source name to the target, given a list of two columns?

Of course, it is easy to create a simple shell script that would:

Code:
find /source/path -type f -name \*.txt.orig | while read f_; do d_="${f_%.orig}"; echo mv "$f_" "${d_%.*}.orig.${d_##*.}"; done

but the problem is that the above command will run mv(1) process for every file, instead of moving all files in a single process, which would be faster.
 
Back
Top