Batch rename of files in a folder

I have searched for a solution but can’t see this subject discussed.

I have just set up a Nextcloud server and started uploading a lot of files to it from my desktop computer and NAS. I now see that in many of the folders the files are all named as they would have been taken from the camera: cam_0001 etc…

I did have a program for Windows that let me rename the files in a folder sequentially based upon a given pattern but cannot find anything like this in either the Nextcloud server or in the add in apps for Nextcloud.

Using the Windows program I could set up a pattern like Holiday2017-xxx where xxx would be incremented by the renaming software.

Is there a feature or an app that does this?

My only other option is to move 2Tb of pictures back off the server, rename them in Windows and then upload them again…


Assuming you dont want to sync your 2TB to the PC:

You could use the mountainduck free trial version, mount your server as a drive and use whatever 3rd party program to do the renaming. This 3rd Party program must support networkdrives btw.

Or you could rename your files directly on the server via shell.
Example here:
or here:

(you will find tutorials for your exact case on the web, this was the first hit, i just googled like 2 seconds)

After that you must run occ files:scan of course, so that the server knows the new filenames.

If i were you I would prefer the first option.

Thanks for the reply. Being new to not only Nextcloud but also Linux, I’ll have a look at the links you recommended.

Pulling the drive out isn’t a problem, but would prefer an in-place option.

I thought a plug-in app might have been an easy solution, but it looks like I may need to go back to the terminal.


If you want to promote the idea of an app for this you could add the “app ideas” tag to this post… :slight_smile: