Rename help

I have a (simple?) requirement that I'm having a hard time figuring out.

I just downloaded about 50 images (big wallpaper files). I would like to select all of them and click a rename button that prompts me for a new file name. Then it would rename each file with the text that I entered and append a sequential counter, and retain the filetype which is different for some files (.jpg, .bmp, etc.).

This is what I have so far but it's not working.

rename PATTERN=*.* TO="{dlgstring|Replace with:}" FINDREP NUMBER 

Try this:

@nodeselect Rename NUMBER="{dlgstring|Enter first number}" REGEXP PATTERN="^(.*)(\.[^.]+)$" TO="{dlgstring|Enter name} [#]\2"

Credit to whoever made this. It certainly wasn't me!

If you want to control numeric padding, you can specify leading zeros in the start number. When prompted, specifying "001" (no quotes) will tell Opus to renumber all selected files using three-digit numbers padded by leading zeroes if required. The button code below (which is similar to the one above) will remind you of this. This button will also allow you to choose the increment by which successively selected files are numbered (defaulted to 1) and automatically renames the file extension to lower case. (I do not specify default values for the other parameters, because Opus does not select the default text in the dialog and I usually want to type fast without having to selecting the unwanted default text first.)

@nodeselect @set BaseName={dlgstring|Enter the base file name for all selected files:|} @set Start={dlgstring|Enter the sequence number for the first selected file (use leading zeros to pad):|} @set By={dlgstring|Enter the sequencing increment for all selected files:|1} Rename CASE=extlower NUMBER="{$Start}" BY={$By} REGEXP PATTERN="^(.*)(\.[^.]+)" TO="{$BaseName} - [#]\2"

WARNING: watch web page line wrapping when copying code. The codebox above should display 5 lines of code.

Both of those were excellent. Thanks.

If you want defaults then I think if you change all the {dlgstring|...} to {dlgstringS|...} then the default text will start selected so you can type over it when you want something else.