It's your lucky week!
I'm working on a Filename Format toolbar to post on the Centre here. You can be one of my testers.
This one was bit tricky. Opus Regular Expression has no provision for replacing an UPPER-cased or lower-case letter with its opposite-cased counterpart. However... Opus does provide upper or lower case file extensions. So we can leverage this to accomplish what you are looking for.
If this file:
subject title - chapter title.txt
Can become this file:
chapter title-txt -.subject title
we can make the new "file name" portion all Title case and the new "extension" all UPPER case like this
Chapter Title-txt -.SUBJECT TITLE
And then flip things back around to get:
SUBJECT TITLE - Chapter Title.txt
Which I believe is what you are after.
Files with more than one hyphen, will end up with only that last section of text in Title Case, like this:
BEFORE: watch - out for this - file name!.txt
AFTER: WATCH - OUT FOR THIS - File Name!.txt
This button can only be used on one selected file:[code]
<?xml version="1.0"?>
{2450C4A3-AB93-4C9B-B089-9B3E6E929A70}
UP - Title 1
Renames files in UP - Title format— "subject title - chapter title.txt" --> "SUBJECT TITLE - Chapter Title.txt" Only works for files with one spaced hyphen — full-auto, safe for only 1 file
16
RunMode Hide
cmd.exe /c Echo.a
{dlgstring|STOP! This button is only safe for 1 file at a time. This process beeps and displays a dialog, once all rename steps are completed. Do not click anywhere in Directory Opus until the completion dialog is displayed, as this might change the active lister! Don't try to use other applications during the rename, as the system focus constantly changes when each rename step is executed. Click CANCEL to abort safely. Click OK to proceed.| }
sync: dopusrt /cmd Rename REGEXP PATTERN="(.*)\.(.*)#" TO="\1¬dot¬\2"
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename REGEXP PATTERN="(.*) - (.*)" TO="\2-.-\1"
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename FROM *.* TO *.* CASE=allwords
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename REGEXP PATTERN="(.*) (.*)#" TO="\1¬_¬\2"
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename CASE=extupper
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename REGEXP PATTERN="(.*)¬_¬(.*)#" TO="\1 \2"
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename REGEXP PATTERN="(.*)-.-(.*)" TO="\2 - \1"
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename REGEXP PATTERN="(.*)¬dot¬(.*)#" TO="\1.\2"
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Select RESELECT
sync: dopusrt /cmd Rename CASE=extlower
sync: Ping -n 1 127.0.0.1
sync: dopusrt /cmd Set AUTOSIZECOLUMNS
sync: Cmd.exe /c Echo.a
sync: dopusrt /cmd {dlgstring|Format rename complete! :-)|" "}
[/code]
There is a huge risk involved in using such a button on more than one file at a time. (Make yourself a test folder with 100 or so files and you will see what I mean.) When I post my toolbar (hopefully by the weekend) I will post a button version that can handle multiple selected files a little better.
To get that button to your toolbar, copy the code text, place Opus in Customize mode, right-click any toolbar and select paste. Test that out and see if it works for you.
Also, I should note, that this button is safe if you have already renamed a file to this format (Which I call UP - Title). A second pass will rename the file again; however, it just gets renamed back to UP - Title format with its file name intact.