bulk renaming multiple file
There are couple of way to rename multiple files.
example we have files
1
image0001.png
2
image0002.png
3
image0003.png
4
...
Copied!
And we would like to rename it to
1
0001.png
2
0002.png
3
0003.png
4
...
Copied!

with for loop

this works with linux and mac without installing anything
1
for f in *.png; do mv "$f" "${f#image}"; done
Copied!

With ZSH

This is my favorite way since I'm using ZSH and oh-my-zsh. Check it now, it's awesome
1
$ autoload zmv
2
zmv 'image(*.png)' '$1'
Copied!
or let zsh automatically define $1, $2 etc
1
zmv -w 'image*.png' '$1.png'
Copied!

Using your editor

for more complex operation, sometimes it easier to rename the file on your editor.
there is qmv from renameutils
1
$ qmv *.png
Copied!
it will open editor with 2 columns, you can edit the right size rename that file
Last modified 1mo ago