This topic explains how to import .orp files containing Rename Presets into your Opus configuration.
A Rename Preset contains the definition of a single rename operation. You'll find various presets in forum threads, and can make your own within the Rename dialog.
The instructions below are for Directory Opus 12 and above. For older versions, the steps were similar but the UI was slightly different; major differences are noted below.
Set up the Rename dialog however you want, then save the current setup into a new Rename Preset via the Save As... item here:
If you want to share the preset with other people, use the Export Current Settings... item in the same menu to save it to a .orp file.
First, open the Rename dialog by selecting a file and clicking the Rename button on the default toolbars:
Rename Presets save all aspects of the Rename Dialog into a named item in the list on the left of the dialog, which you can use to recall or re-apply the same settings later on:
You can also import and export these presets via .orp files, to share them or to create backups.
To import a .orp preset someone has posted to the forum, for Opus 12 and above:
Download the file to your computer.
If the .orp preset is inside an archive (.zip file, etc.), extract it.
Select Import Preset File:
Make sure Add to Preset List is turned on.
(This is assuming you wish to add the preset to the list on the left of the Rename dialog. If you only want to use the preset once, or just want to look at how it works, then you can turn off Add to Preset List and the preset will set up the rename dialog but will not be added to the list.)
Chose the .orp file you wish to import, and you are done.
For Opus 11 and earlier:
- Open the Rename dialog
- Select File > Import
- Choose the .orp file.
- Unlike Opus 12, the preset has not yet been saved into your preset list; it has only been temporarily loaded into the dialog. To save it to your preset list, click the Add icon above the preset list on the right, which saves the dialog's current state into the list of presets.
Some rename threads include toolbar buttons or raw commands. For importing those, see How to use buttons and scripts from this forum.
While rename scripts are usually shared in the form of .orp presets, which set up the whole Rename dialog, you might find some posts which just post a rename script on its own.
To use such a script, open the Rename dialog and click the Edit button to open the script editor:
The script editor will open on the right of the rename dialog. At the top there is a field to set the script language (usually JScript or VBScript). Change that to match the langue of the script, then copy and paste the script code from the post into the editor.
You can then save the script into a Rename Preset using the Save As... item in the Rename dialog's menus:
(In case you get deja vu, this section is similar to the end of the sister post, Rename scripts in JScript, VBScript and PerlScript. Each post has information tailored to the subject at hand, but there is a lot of overlap.)
If you wish to use a rename preset from a toolbar button (or menu item, hotkey, etc.), instead of from within the Rename window, there are several ways to do it.
Although it is not required, it is usually nice to use
@nodeselect with buttons that rename files, since you often want to keep them selected to do other things with them afterwards. The examples below include this where applicable.
Reference a Rename Preset from a button:
You can make a button which refers to a rename preset. If the preset is called Multi-RegExp then the button's command would be like this:
@nodeselect Rename PRESET="Multi-RegExp"
Use the Rename Preset menu:
If you're using the default toolbars that come with Opus 12 or above, you'll find all rename presets are already accessible via the menu attached to the Rename button.
Everything in a Button:
This is not really a rename preset, but an alternative to using them. All of the options within the Rename dialog also exist as arguments to the
Renamecommand, so you can create a button which does the same things without having to create a rename preset.
If you only want to run the rename from one button, and don't want a preset cluttering up the list of other presets in the Rename window, then you can put everything (including scripts, if needed) into your button:
@nodeselect RENAME PATTERN="*" TO="*" @script vbscript Option Explicit Function OnGetNewName(ByRef getNewNameData) Dim item Set item = getNewNameData.item OnGetNewName = item.name_stem & " TEST" & item.ext End Function
We usually recommend you create a preset instead of saving the script directly into a button, as it makes it easier to use the same thing from other places, including within the Rename dialog itself, but it's up to you.