User Tools

Site Tools


linux:mass-renaming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:mass-renaming [2018/07/30 17:12] – created Wulf Rajeklinux:mass-renaming [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 12: Line 12:
 Rename extension: Rename extension:
 <code>rename 's/\.pdf$/.doc/' *</code> <code>rename 's/\.pdf$/.doc/' *</code>
 +
 +Swapping parts of filename:
 +<code>rename 's/(.*) - Linkin Park (.*)$/Linkin Park - $1 $2/' *.mkv</code>
  
 for dry-run, use -n option! for dry-run, use -n option!
 +
 +Mass moving files from numbered directories into another one (bash for loop):
 +<code>for i in `seq 2 30`;do mv bla$i/* target_directory ; done</code>
 +
  
  
 +A graphical bulk renaming tool is:
 +<code>sudo apt-get install pyrenamer</code>
 +{{:linux:pasted:20180805-155925.png}}
linux/mass-renaming.1532967142.txt.gz · Last modified: 2023/05/29 11:53 (external edit)