Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== rename multiple files ====== You have a folder full of files that need to be renamed in some way. In this example, we have files from iMovie named Clip 01.mp4, Clip 02.mp4 etc... but we want them to be named 012_01.mp4, 012_02.mp4, etc... Use a bash loop with sed: <code> ls -1L *.mp4 | while read file;do mv "${file}" `echo "${file}"|sed 's/Clip /012_/'`; done </code> * note - this does work with filenames having spaces, but see the [[bash_loop]] page for more details docs/bash/rename_multiple_files.txt Last modified: 2010/04/10 18:02by billh