Combining multiple rename presents into 1 without a button?

Hi I have had this question for a while and didn't think about asking.

Basically, I have a lot of rename presents overall. But in this case, I have a general cleanup rename presents group (lets say about 12 that I use on all files for general cleanup). Is there any way to combine these (12) into (1) rename present. Like, is there a certain script code that I can modify and place each name present in? Some of them are with REGEX, some are find and replace, etc. I'm not too fimilar with scripting, but if there was a way I can just copy the REGEX or find and replace portion.

(For example - I have one name regex that removes specific cities from all file name and replaces with the project name, another regex to add a hyphen before the date within the file name, add a project number to the file name, etc)

Currently, I created a button that goes through all (12) rename presents, but it would be nice just to have (1) rename present that I can reference over time and modify with additional presents over time.

1 Like

Hi again

I have successfully combined my rename presents with JScript, but encountered a small question that wasnt in the documentation. With JScript, do you have a sample on creating an if statement for a regex match so i can apply multiple other regex only if it the main matches.

For example, if filename contains Project Name, reformate the project name, remove city, add project number, etc. If it doesnt match skip entirely.

Basically i just need to know how to create an IF statement with JScript.

Looks like what you need: javascript - How to search for a substring and a regex in a string? - Stack Overflow