Batch rename

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

SoCu
Posts: 52
Joined: Thu Jul 29, 2021 5:10 pm

Batch rename

Post by SoCu »

Hi, how can I rename file names, which also contain part of the original name?

For example, files with names:
3T1A8393.jpg
3T1A8394.jpg
3T1A8295.jpg

Rename them as:
Uno_3T1A8393.jpg
Uno_3T1A8394.jpg
Uno_3T1A8295.jpg

Or:
3T1A8393_uno.jpg
3T1A8394_uno.jpg
3T1A8295_uno.jpg

Keeping the original name, or part of the name.

Is there any way using special characters, to achieve this?


Thank you.
Franky
Posts: 245
Joined: Fri Mar 06, 2020 1:28 pm
Location: France - BZH

Re: Batch rename

Post by Franky »

Hi,

If you want to keep the original file name try this {Filename}_Uno
SoCu
Posts: 52
Joined: Thu Jul 29, 2021 5:10 pm

Re: Batch rename

Post by SoCu »

Great Franky, this way I have been able to change them.

There is some list of these commands, to see that more things it allows, because for example to change some characters for others, it is possible to make, or this already is to curl the curl.
Franky
Posts: 245
Joined: Fri Mar 06, 2020 1:28 pm
Location: France - BZH

Re: Batch rename

Post by Franky »

Yes you can modify a character string by another with the "Replace" function
SoCu
Posts: 52
Joined: Thu Jul 29, 2021 5:10 pm

Re: Batch rename

Post by SoCu »

Yes you are right, easier than I thought, having disabled that option, I was thinking of doing it from the "template name" section.

Thank you.
SoCu
Posts: 52
Joined: Thu Jul 29, 2021 5:10 pm

Re: Batch rename

Post by SoCu »

Hi, I'm going to ask here, not to open a new post, how to rename.

The question is... is there a possibility to rename folders ?

Thank you.
Franky
Posts: 245
Joined: Fri Mar 06, 2020 1:28 pm
Location: France - BZH

Re: Batch rename

Post by Franky »

Hi,

Yes of course, a right click on the folder or F2
SoCu
Posts: 52
Joined: Thu Jul 29, 2021 5:10 pm

Re: Batch rename

Post by SoCu »

Yes, that can be done when it is a single folder.

I forgot a detail, it is to rename for example 50 folders, but changing some character, for example:
J_J_1111
rename to:
J J 1111
User avatar
michel038
XnThusiast
Posts: 1297
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Batch rename

Post by michel038 »

Rename folders is always a bit dangerous; you can loose a lot of files if there is a mistake.

I think it's not possible witk XnviewMp.
XnviewMP can change folder names for selected files, but only if the new folder already exists
(= move files : example: rename D:\2023\Sept\DSC0001.jpg and replace \Sept\ by \09\ )

I use Ant Renamer freeware :
-Add folders (only "add selected folders" option)
-Actions "String replacement" ... with only "Replace all" and "case sensitive" options if useful
- Click "Refresh preview" (F5) button
... if it's OK, Go !
SoCu
Posts: 52
Joined: Thu Jul 29, 2021 5:10 pm

Re: Batch rename

Post by SoCu »

Thanks, in the end I used another dedicated application for this, and it does warn when you rename folders containing files, but it has an option to not select folders and not files, this way I was able to rename them.

Thank you.