I had to rename a bunch of files, where the start of the filename should be changed. After looking at a lot of documentation, I came across something that looks like this:
for FILE in StartOfFileNameToBeChanged*; do NEWFILE=`echo $FILE | sed 's/StartOfFileNameToBeChanged*/NewStartOfFileName/g'`; echo "$FILE becomes $NEWFILE"; mv $FILE $NEWFILE; done
The code above is one line that's executed in the terminal. If you want to test it before actually renaming anything, just remove the
mv $FILE $NEWFILE; part like this:
for FILE in StartOfFileNameToBeChanged*; do NEWFILE=`echo $FILE | sed 's/StartOfFileNameToBeChanged*/NewStartOfFileName/g'`; echo "$FILE becomes $NEWFILE"; done