Comments on: How to Rename Multiple Files on Linux https://www.rosehosting.com/blog/how-to-rename-multiple-files-on-linux/ Premium Linux Tutorials Since 2001 Mon, 05 Dec 2022 12:43:43 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Multiple Mover https://www.rosehosting.com/blog/how-to-rename-multiple-files-on-linux/#comment-46745 Sun, 11 Mar 2018 04:58:22 +0000 https://www.rosehosting.com/blog/?p=25869#comment-46745 The rename utility is one way to rename multiple files, but you have overlooked a better alternative — mmv (multiple move) — which also have an important safety feature of not overwriting files due to collisions arising from syntax errors in the target specification.

]]>
By: admin https://www.rosehosting.com/blog/how-to-rename-multiple-files-on-linux/#comment-46744 Sat, 10 Mar 2018 09:54:49 +0000 https://www.rosehosting.com/blog/?p=25869#comment-46744 In reply to Roland.

Hi Roland,

It is really useful example. Sometimes you may need to change a file extension from .txt to .html, .txt to .text , etc…

]]>
By: Roland https://www.rosehosting.com/blog/how-to-rename-multiple-files-on-linux/#comment-46743 Fri, 09 Mar 2018 15:10:24 +0000 https://www.rosehosting.com/blog/?p=25869#comment-46743 Slackware et al also have the not-so-good version of rename. Luckily, the version in Deb/buntu/Mint is actually a perl script, so it and its manpage are portable.
I don’t understand the ‘change file type’ example. Is it trying to replace filename extensions? They are an MS thing and shouldn’t be used to determine file type. Gnome, looking at you. See ‘man magic’ for the details on linux/unix filetypes.

]]>
By: ollycat https://www.rosehosting.com/blog/how-to-rename-multiple-files-on-linux/#comment-46742 Fri, 09 Mar 2018 12:29:45 +0000 https://www.rosehosting.com/blog/?p=25869#comment-46742 If I using example from the text I have this:

rename -nv ‘s/file*/our $i; sprintf(“name%03d.txt”, 1+$i++)/e’ *
file1 -> name001.txt1
file2 -> name002.txt2
file3 -> name003.txt3
file4 -> name004.txt4

But if I use only “.*” I have correct names:

rename -nv ‘s/.*/our $i; sprintf(“name%03d.txt”, 1+$i++)/e’ *
file1 -> name001.txt
file2 -> name002.txt
file3 -> name003.txt
file4 -> name004.txt

I don’t understand why. :(

]]>
By: Anonymous https://www.rosehosting.com/blog/how-to-rename-multiple-files-on-linux/#comment-46741 Fri, 09 Mar 2018 08:58:05 +0000 https://www.rosehosting.com/blog/?p=25869#comment-46741 From Gnome 3.22 and forward, this is a built in feature in their filemanager (nautilus). Just select multiple files, right click and select “Rename…”.

]]>