GP SoftwareTwitter
Opus FAQsManualCommandsObjects

How to use Rename Presets from this forum


#1

This topic explains how to import .orp files containing rename presets into your Opus configuration.

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.


Rename Presets (.orp files)

First, open the Rename dialog by selecting a file and clicking the Rename button on the default toolbars:

Rename button

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:
    Rename import

  • Make sure Add to Preset List is turned on.

    Rename Add To Preset List

    (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.

Buttons and Commands

Some rename threads include toolbar buttons or raw commands. For importing those, see How to use buttons and scripts from this forum.


Rename Scripts (not inside a Preset)

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:

Edit script

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.


Using a Rename Preset outside the Rename Dialog

(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.

  1. 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"
    

    Rename Preset via Button

  2. 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.

    Rename Preset Menu

  3. 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 Rename command, 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
    

    Rename Script in Button


Dots to spaces except in numbers. (For files and folders.)
How to use buttons and scripts from this forum
#2

#5

(Dummy reply to fix a forum issue.)


#6

Hi Leo, where on the forum can you download the rename orp file? I have a very simple rename issue, I have a batch of images I would like to rename swp01, swp02, swp03 etc. Can you add a simple batch rename to the orp file or is there an easier solution using regular expressions?

Thanks in-advance.


#7

A .orp file contains the definition of a single rename operation. You'll find various .orp files in some of the threads in the Rename Presets area here at the forum.

If you want help with your own custom renaming needs, please start a thread in the main Help & Support area with more details. (e.g. You've said the names of some files you want to rename, but haven't told us what you want to rename them to.)


#8