Using Advanced Rename with Filelists

As well as working with files that are currently selected, I sometimes need to use advanced rename with list of files found in a text file:

C:\temp\blue.md
C:\temp\red.md
C:\temp\green.md
C:\temp\grey.md
....

and other times provide these files explicitly to the command. In either case, I have not been able to figure something out on my own.

I tried following the documentation Rename FROM 'C:\temp\blue.md' 'C:\temp\red.md' and Rename FROM 'C:\temp\blue.md','C:\temp\red.md' both seem to only open the dialog with a single file loaded.

Two options:

  • Convert the file list into a collection, then go into the collection, select everything and run the rename on that.

  • Alternatively, use scripting to load the file list and set the paths on a Command object, then run the Rename command via that object.

2 Likes

While I appreciate the suggestion and I will most likely go with the second option, it seems very underwhellming for a "advaned rename" feature, that at the very least we are not able to explicitly provide two or more paths at the command line.

Would the developers then please consider a feature request to allow for this in the future.

Cheers.

It's not really related to Rename at all; it's a question of getting a list of files into Opus to then perform actions on, which could be anything, not just Rename.

Collections and scripting both provide ways to do that.

(Being able to specify multiple FROM files with Rename wouldn't really help, either. You'd still need a way to get the list into the command, at which point you could just run the rename command once per file if doing things that way.)

Grab this script, replace Copy with Rename, and you are good to go :slight_smile:

Okay, you also need to delete the butchered copyright line :wink:

1 Like

@Leo in hindsight, I recognise that you are correct. I have run into a similar issue with passing multiple file paths to the external viewer as well, so I can see the consistency. Anyways, I wrote a script to do it and it was simple enough once I figured out templating and argument parsing.

@lxp :smiley: if only I read this thread a few hours earlier, alas this served as a good excersise to figure a few things I have meaning to figure out in Opus.

Thank you both.

1 Like