Rename in Bulk

I have a button to search and replace underscores with a space AND a left-round brackets with nothing.

Rename PRESET="FixFilenames"
Rename PATTERN="_" TO=" " FINDREP
Rename PATTERN="(" TO="" FINDREP
@NODESELECT

This seems to work fine one file at a time. If I select more than one file the command prompts for each one.

I just want it to go ahead and execute.

What is the FixFilenames preset?

The TO="" part won't work as you need to use a special syntax to indicate an empty string. Use TO="~" instead.

Got it working ...

FixFilenames is the name of the pre-setup (PRESET) configuration that I have created to do the renaming that essentially sets it as "Find And Replace"

What was happening was exactly your point .. you can't use the TO="".
You need to use the directive as you said TO="~"

Running a rename preset on the first line has no affect on the other two lines. You can probably get rid of that first line entirely.

The FINDREP argument on the 2nd and 3rd line is what makes those two lines perform a find & replace.

What is the syntax for an "=" sign?

Rename PATTERN="=" TO="~" FINDREP

You've answered your own question there. :slight_smile:

It isn't the = sign after all ... that was a red herring.
I need the syntax for this one .. 3 spaces TO 1 space.

What is this, bounce back and forth between two threads day? :slight_smile:

There's no special syntax for that. Just try it.

Actually it works.

What is happening is that when you do renames wher files have multiple occurances of the find/replace item, Opus loses track of the filename and fails. For example, when trying to rename 3 spaces to 1 space then 2 spaces to 1 space; Opus complains that it cannot find a filename to rename.

Are you just trying to collapse all consecutive spaces into a single space? There are better ways of doing that if so.

Yes, I am ... (sorry about the double post ... I though I might need to start a new topic as I've digressed a bit).

This'll collapse all the spaces in one go:

Rename PATTERN="(.*)  (.*)#" TO="\1 \2" REGEXP

(There should be two spaces after the first (.*) and one space after the \1.)

Works ... thanks for all of your help!