GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Renaming and capitalization

Hello,
First, my best wishes to everybody in this difficult time throughout the world.
As we are on lockdown, I am dedicating some energy to learning new skills as well as exploring DO and some of its innumerable functions, including file renaming.
Although I have found assistance in the integrated help file and by searching the Internet, I have a two-part question and would be grateful if anyone can help, or at least point me in the right direction with what could be either very easy, or impossible.
I have tried various different methods with macros and some of the scripts available in the forum (I am not a scripting expert, I am more at home with cmdlets and batch operations) to achieve the following:
Specifically, what I want to do is to rename multiple files (sometimes 100 or more) so that two, or sometimes three, consecutive alphabetical characters are in uppercase/capital letters.
The characters always occupy the same consecutive positions in each batch of file names, e.g. #2 and #3, or #5 and #6, etc., and are preceded and/or followed by strings of alphanumerical characters (upper or lowercase, with or without hyphens or dots, etc) and these should remain unchanged.
The file names are followed by a dot and the extension, e.g. in file ‘ab12cdefgh34jK5.mnp-etc.ext’ characters #7 and #8 should be uppercased/capitalized to ‘ab12cdEFgh34jK5.mnp-etc.ext’.
I have to stress that the two (or sometimes three) consecutive alphabetical characters can be any letters from the Latin alphabet, i.e. from ‘a’ to ‘z’, so I surmise that a simple “find and replace” would not function.
Question 1. Is this rename operation possible with Directory Opus?
Question 2 (conditional on the answer to question 1 being ‘yes’ or similar). How?
Maybe I am missing something obvious, if so I apologize in advance.
P.S. To reiterate a message from my professional affiliates:
At this time, please protect all others, including your families, neighbors, communities and, most of all, your health service personnel, by staying at home and limiting exposure unless absolutely necessary i.e. for medical care or food purchases, and stay safe.
Many thanks in advance.

1 Like

I made this for you, which should get you started, if not solve things completely:

Agreed! :clap: :clap: :clap:

1 Like

Hi,
Thank you for your rapid response.
This is exactly what I am looking for!
Best regards.

Hello again,|
I have just applied your Uppercase Range plugin to rename a ‘small’ batch of real file names. A total of 1,438 files were renamed as required - and in less than 10 seconds!
Thank you very much for your help.
Best regards.

3 Likes