Page 1 of 1
Simple filename capitalization
Posted: 14 May 2016 17:10
by bifjamod
How can I convert a file name to all caps? For example, I might accidentally name my file 32760dox, and need it to be 32760DOX (for the sake of consistency). I've tried with a Regex pattern, with no success:
That just tries to append the letter U to my file name....the file extension does not need to be changed.
TIA
Re: Simple filename capitalization
Posted: 14 May 2016 17:30
by highend
The VB regex engine is limited and doesn't support \U.
A script (on a button / keyboard shortcut, etc.) would e.g. do it:
Code: Select all
renameitem(recase(gpc(<curitem>, "base"), "u"), , 1);
Re: Simple filename capitalization
Posted: 14 May 2016 17:53
by admin
If the extension can be upper case as well then it's built in:
menu File | Rename Special | AAA AA.AAA
Re: Simple filename capitalization
Posted: 12 Jul 2016 20:29
by bifjamod
admin wrote:If the extension can be upper case as well then it's built in:
menu File | Rename Special | AAA AA.AAA
Thanks admin; I'd prefer not to have capitalized extensions, but it's preferable to uncapitalized file names!
Re: Simple filename capitalization
Posted: 23 Sep 2016 18:00
by bifjamod
highend wrote:The VB regex engine is limited and doesn't support \U.
A script (on a button / keyboard shortcut, etc.) would e.g. do it:
Code: Select all
renameitem(recase(gpc(<curitem>, "base"), "u"), , 1);
highend - thank you very much! This was exactly what I needed; just wish I hadn't dilly-dallied 5 months before setting it up!