I cannot rename files in bulk using ubuntu's rename feature. The files are on a NTFS partition.

I want to rename files that look like this:

whatever pic george.jpg
tacoma narrows bridge.jpg
green bottle.jpg


filename (1)
filename (2)
filename (3)

And I cannot do this at all. I don't want to use the command line either. So I can permanently erase files after I have encrypted them without exposing their contents to people who use a file recovery tool.

I also don't want a method that takes days or months to rename the file. That is, rename one file at a time. So if I have hundreds of files to rename, this won't be a option. I want to give a each file the same name and numbered in order like shown above.

Pyrenamer is not an option for me, unless you can find how to do that in PyRenamer.


You can use the rename command, which is usually included in a default installation:

rename 's/.*/sprintf("filename (%d)", ++$ENV{c})/e' *

This would do precisely what you asked for. Use the -n flag if you want to do a test first:

rename -n 's/.*/sprintf("filename (%d)", ++$ENV{c})/e' *

This assumes that the environment variable c is undefined, which will cause the count to start from 0. If you want to be extra safe, you could call it like this:

c=0 rename -n 's/.*/sprintf("filename (%d)", ++$ENV{c})/e' *
| improve this answer | |

Install pyrenamer from the software center or via terminal:

sudo apt-get install pyrenamer

"You can rename files using patterns, search and replace, substitutions, insert or delete text, or even rename files manually. You can also rename images using their EXIF tags and music using their internal tags."

To do this with pyrenamer, the renamed filename pattern should be filename ({num+1})
Check screenshot below:

enter image description here

| improve this answer | |

Mass Rename is a simple pair of shell scripts which make it easier to move, rename, or copy multiple files at once.

Install mrename in Ubuntu

sudo apt-get install mrename

Using mrename

mrename pattern prefix [option]

There are only the following three options.

-c The option -c will copy each file with the new filename.

-m The option -m will move each file in the new filename.

-h Display help.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.