Friday, December 5, 2008

Rename files which match specific criteria

This renames all files within the current working directory from .exe to .exeold. This is useful if you are trying to rename any file extension from one to another.

for file in *.exe ; do mv $file `echo $file | sed 's/\(.*\.\)exe/\1exeold/'` ; done

No comments: