Quick Renaming Button

Hey Guys,

Want to create a button that would utilize the standard rename ..... What I wanted to do is add "DCT" in front of the existing file name..

OLD Name: City Hall Building Report.docx
New Name: DCT City Hall Building Report.docx

I know how to do it in the rename function, but can I just create a button that would do this?

thanks

Rename PATTERN "*" TO "DCT *"

thanks

and and, what would be the code if i wanted to create a button for

Modify Capitalzatioin, Capitalize all words

thnks

You can make a three way button with your first function, plus two others (or you make a rename toolbar with all possible case renames).

Renaming all word to upper case:

rename Case=allwords

Renaming the extension to lower case (using »extupper« would rename to upper case)

rename Case=extlower

Rename only the first word

rename Case=firstword 

For renaming all names to upper or lower case, use the »lower/upper« arguments.

Rather than coming back every few minutes with yet another request for a personally handcrafted button, you might like to investigate the sections give over to just these functions:

Directory Opus Resource Centre • View forum - Rename Scripting

and

Directory Opus Resource Centre • View forum - Buttons & Toolbars

I mention this because I also wanted to work out some slightly strange things, and, apart from not wanting to impose on people too much, I concluded that it would be quicker to spend a little time learning the principles so that I could roll my own.

The thing to look for is a script that is near as dammit to what you want to achieve. Then experiment. There are already some there that do what you have asked for. Unfortunately, they don't always come with the step-by-step documentation that would make it easier for a genuine dunce like me to understand them, but you get the hang eventually.

You may also find that a search of this place will throw up useful tips.

Of course, if you end up in "Regex" territory, that is another matter. That particular domain is beyond my feeble and fading brain power, so I would probably have to turn to the experts, who seem to do this stuff in their sleep.

Not to mention the Raw Commands section of the manual on the Rename command, which lists all the arguments (like for changing the case of files).