If Filename contains then rename

Advanced Renamer forum
#1 : 15/02-21 22:02
Jamesson
Jamesson
Posts: 1
How can I set up a script so that if some specific characters in a filename, then I rename it to something else? And then hopefully have several such if statements.


15/02-21 22:02
#2 : 16/02-21 02:19
Irtsy
Irtsy
Posts: 1
Reply to #1:

The "replace method" will allow you to swap characters, if I'm understanding your question correctly.

For example, if your file is named "Television Show X episode3 1080p.mkv" and you want to replace "X" with "Y," all you have to do is set "Y" to replace "X" within the replace form. You can also set how many occurrences you want and if you want it to apply to the file name, extension or both.

You can also set as many different "replace methods" as you want.

https://i.imgur.com/xrEyo8a.png


16/02-21 02:19
#3 : 17/02-21 06:26
Beat
Beat
Posts: 1
Reply to #1:

So you mean 'conditional replace like e.g:
-> if filename contains 'Internet', replace with 'WEB', if contains 'Fileserver', replace with disk, else do nothing

Easiest would be a 'LIST REPLACE' (e.g. ö->oe and ä->ae) or just do several several REPLACE in sequence.

If not, post a detailed sample ...


17/02-21 06:26