Modify Move As Command For Multiple Rename

I regularly have to move or copy large numbers of files to a new folder and rename them all in numbered sequence. I cannot rename them in situ and then move or copy them because finding them and renaming them in the new location is a pain.

I currently select the files in the source folder and use the 'Move As' or 'Copy As' command but while this correctly interprets my intention, it means I must rename each file individually.

What I want to do is (schematically) this: d:\panasonic\pica.rws,picb.rw2,picc.rw2 -> d:\review\review001.rw2.review002.rw2,review003.rw2

Basically, I'd like to modify the Move As and Copy As commands to move or copy the files while behaving like this Rename function
@set filename={dlgstringS|Rename to:|{file$|noext}}
@set startnum={dlgstringS|First Number Begins with:|01}
@set numby={dlgstringS|Incrementing By:|1}
Rename PATTERN "..(.)" TO "{$filename}[#].\1" NUMBER {$startnum} BY {$numby} REGEXP
@nodeselect

Any thoughts gratefully received.

Please link your account.

Also, which version of Opus are you using? (Profile says Opus 10, but people often don't update that and scripting in Opus 11 may make things easier.)

Wrist slapped and account linked :slight_smile:

I'm using version 11.15. I used to do quite a bit of VBS and Javascript (for web pages) but it got to a point where everything I needed to do had been done before and better by someone else.

Thanks for linking!

If you want things like the rename command you've got already, but copying or moving the files as well, you can simply add the Copy or Copy MOVE command to the end. For example:

@set filename={dlgstringS|Rename to:|{file$|noext}} @set startnum={dlgstringS|First Number Begins with:|01} @set numby={dlgstringS|Incrementing By:|1} Rename PATTERN "^.*\.([^.]*)$" TO "{$filename}[#].\1" NUMBER {$startnum} BY {$numby} REGEXP Copy MOVE

That will rename the files, as before, and then move them to the destination folder. (I changed the regexp slightly, by the way, but just to make it more precise.)

With scripting you could also streamline this by having the script look at what is in the destination folder and set startnum automatically, so you don't have to work it out yourself. That's assuming you always want the new files to continue the numbering without any gaps. Do you want to do that as well (I can write it for you), or is the above button already what you want?

A script could also move and rename the files in a single operation, instead of doing a rename and then a move, but it would add complexity (particularly if you want nice overall progress display) and there's probably no advantage in doing it that way, unless there might be other files in the source folder that conflict with the new filenames.

It's so simple and obvious - once ot has been pointed out! Thanks Leo, much appreciated.

As you say, a script might be a bit more streamlined but I like to see what is going on and your amendment is exactly what I need. Ditto the continuation of numbering, each time I rename and move it is with a different name and different folder, so I rest content.