I have a bunch of files x1.jpg, x2.jpg, x3.jpg, etc. that need to be named x001.jpg, x002.jpg, x003.jpg, etc. How can I do this?
Edit: I'm running windows but have cygwin installed.
|
I have a bunch of files x1.jpg, x2.jpg, x3.jpg, etc. that need to be named x001.jpg, x002.jpg, x003.jpg, etc. How can I do this? Edit: I'm running windows but have cygwin installed. |
|||||
|
|
In pure bash:
|
|||
|
|
|
Multiple or mass renaming can be called batch renaming. Total Commander is file manager. It has batch rename feature. You can see tutorial there or there. Irfan View is image browser/editor. It has batch rename too. You can see tutorial there. I prefer Total Commander. It has Linux clones and they can probably rename files too. Both these programs are for Windows. Both should work in Linux too by emulation. |
|||
|
|
|
Cygwin, sweet.
This should work. Well other than the commented out mv. The -w flag to seq means 'wide', meaning begin pad with zeros when necessary |
||||
|
|
|
For bulk renaming image files on Windows (as well as resizing, cropping, converting etc.) I often use IrfanView (Freeware) |
|||
|
|
|
A more generic approach than
|
|||
|
|
|
Which OS? *nix has the |
|||
|
|