linux:mass-renaming
This is an old revision of the document!
Mass renaming in bash
Add prefix to filename:
rename 's/^/MyPrefix_/' *
Remove part of filename:
rename 's/SEARCH/REPLACE/' *
Add suffix to filename:
rename 's/$/_MySuffix/' *
Rename extension:
rename 's/\.pdf$/.doc/' *
for dry-run, use -n option!
Mass moving files from numbered directories into another one (bash for loop):
for i in `seq 2 30`;do mv bla$i/* target_directory ; done
A graphical bulk renaming tool is:
sudo apt-get install pyrenamer
linux/mass-renaming.1533481292.txt.gz · Last modified: 2023/05/29 11:53 (external edit)