Toolbar button syntax for RENAME using EXIF fields

I have searched through - and found - many past posts related to RENAME but none that quite does what I want. I have two questions with which I'd be grateful for some help.

  1. As a result I think of messing around using RENAME in buttons (see below) the rename dialog no longer pops up when I hit the button for the built-in RENAME command. When I look at the button it seems normal (the command is simply "Rename") but when I click it the file goes into inline rename mode. What have I done?!

  2. When the rename dialog does appear as it should, I have a preset for renaming digital camera images. It consists of 'standard rename' with the 'old name' field set to "*.jpg" and the 'new name' field set to "{shootingtime|D#yyyy-MM-dd}-{shootingtime|T#hhmm-ss}-{fnumber}-{isorating}.jpg", and the 'enable file information fields' option checked. This works well. The problem is that I am trying to put it on a toolbar button for one-click renaming of the selected file/s and I can't quite work out what syntax I need. I have tried various flavours of RENAME FILEINFO TO=etc RENAME *jpg TO and so on - nothing seems to work. I'm sure I am missing something very basic, just a switch or two, but I cannot work out what it is.

Any pointers on either of the above issues would be very much appreciated.


  1. The command should work with just Rename which will open either the SIMPLE or ADVANCED dialog depending on which was used last, not sure what you've done to make that fail but you can force the dialog by using Rename SIMPLE or Rename ADVANCED

  2. You can configure a button to use one of your presets with the following : Rename PRESET="TEST". Of course, subsitute TEST for the name of your preset, not forgetting quotes around the name if it contains spaces.

  1. Using a preset, as Steve suggests, is the easiest way but if you're curious about how to do everything within the button (e.g. if you don't want to clutter up your list of presets) then this is the syntax:
Rename FILEINFO PATTERN "*.jpg" TO "{shootingtime|D#yyyy-MM-dd}-{shootingtime|T#hhmm-ss}-{fnumber}-{isorating}.jpg"

Steve and Leo, thanks for the speedy and helpful responses. This is getting stranger and stranger.

First I tried Leo's response, copying and pasting into a button, as per this screenshot. However, when I selected a file on the desktop and clicked on the button, this did not work. Selecting a valid jpeg file and clicking on the button puts it into inline rename mode, i.e. the name is highlighted and I can edit the text. Here's where it gets weird. When I click on the standard rename button, nothing happens - it just goes into inline rename mode! (This is on my home PC - earlier when I talked about the dialog box not appearing I was referring to my work PC, so now after using the rename button on a file my home PC is showing similar behaviour i.e. a missing dialog box.) Using the SIMPLE or ADVANCED keywords has no effect.

Furthermore, I made a new folder called c:\test and copied the same jpeg file to it in order to experiment further. In this new folder the standard rename dialog DOES appear. Moreover in this folder Leo's suggested button syntax DOES work. This holds for other folders as well, but not for the desktop. Could it be some issue with Desktop permissions that is both causing Leo's script to fail and the dialog not to show? Very strange.

I have one more question if I may - I have a fair number of files that have the same date and time and dopus fails to rename these due to duplicate file names. Is there a simple way to insert a unique number or sequential number of some kind into the new file name so that I can be sure of having a unique file name?


Your final post reveals the missing piece of information. :slight_smile:

The Rename dialog does not appear to work with the Desktop folder. It works fine if you navigate to the real location of the desktop rather than the namespace :


Regarding your followup question, the Advanced rename dialog contains a sequential numbering option. Simply tick it and select the options you like and use [##] in your NewName string.

FWIW, you can use /desktopdir to find your desktop folder. Handy if you move OS or use the same config with different account names.

The automatically rename if new filename exists checkbox is probably what you want. (AUTORENAME argument if you want to add it to your button.) That'll pick a number automatically if the name already exists.