rename single filename to UPPERCASE?

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
brontosaurusrex
Junior Member
Junior Member
Posts: 23
Joined: 2021-01-01, 17:56 UTC

rename single filename to UPPERCASE?

Post by *brontosaurusrex »

When I have a single file selected/in typing rename mode, is there a shortkey to UPPERCASE that text selection? (I'am aware that multirename has case change option)
User avatar
petermad
Power Member
Power Member
Posts: 16096
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: rename single filename to UPPERCASE?

Post by *petermad »

There isn't a build-in shortkey for that.

But you can make your own external command to rename a single file to upppercase.
1. First open the Mutli-Rename Tool and set it up to rename to upperscase
2. Press F2 and choose Save settings and name the setting: Uppercase
3. Open your usercmd.ini files (located in the same place as your wincmd.ini file - if you don't have a usercmd.ini, just make it in notepad).
4. Put this code in the usercmd.ini file:

Code: Select all

[em_Uppercase]
cmd=MULTIRENAME ==Uppercase
5. you can now assign the command em_Uppercase to a keyboard shortcut (Ctl+U for example) or use it in a button in the button bar.

Notice - the em_Uppercase command will rename all selected files, not just the one under the cursor.
If you assign em_Uppercase to a keyboard shortcut, that shortcut will not work if you have pressed Shift+F6 on the file.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: rename single filename to UPPERCASE?

Post by *white »

petermad wrote: 2024-05-20, 09:28 UTC There isn't a build-in shortkey for that.
I think that's not what the OP asked for. I think he asked for a keyboard shortcut to convert a selected part of a filename to uppercase when renaming a file.
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: rename single filename to UPPERCASE?

Post by *Fla$her »

brontosaurusrex wrote: 2024-05-20, 08:01 UTC is there a shortkey to UPPERCASE that text selection?
No.
petermad wrote: 2024-05-20, 09:28 UTCBut you can make your own external command to rename a single file to upppercase.
The alternative:

Code: Select all

TOTALCMD#BAR#DATA
%comspec% /q/c for %f in
("%S") do for /f "tokens=2 delims=\" %%n in ('tree \%%f\^|find ":\"') do ren %%f "%%n"
wciconex.dll,199
Selected names to UPPERCASE

1
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: rename single filename to UPPERCASE?

Post by *white »

Moderator message from: white » 2024-05-20, 16:49 UTC

Moved 6 off-topic posts starting here to off-topic thread.
massor
Junior Member
Junior Member
Posts: 26
Joined: 2022-05-01, 18:30 UTC

Re: rename single filename to UPPERCASE?

Post by *massor »

I think is about a similar feature in MS Word where Shift+F3 cycle case for selected text. Everything 1.5 use it also.
User avatar
brontosaurusrex
Junior Member
Junior Member
Posts: 23
Joined: 2021-01-01, 17:56 UTC

Re: rename single filename to UPPERCASE?

Post by *brontosaurusrex »

@massor, Yeah that was the idea.
@petermad, Thanks, multirename to uppercase with single click is just great.
@Fla$her, Thanks.

btw, chatgpt also 'found' a more general solution/workaround, which is to uppercase stuff in clipboard

Code: Select all

powershell -command "Set-Clipboard -Value ((Get-Clipboard).ToUpper())"
User avatar
brontosaurusrex
Junior Member
Junior Member
Posts: 23
Joined: 2021-01-01, 17:56 UTC

Re: rename single filename to UPPERCASE?

Post by *brontosaurusrex »

petermad wrote: 2024-05-20, 09:28 UTC you can make your own external command to rename a single file to upppercase.
1. First open the Mutli-Rename Tool and set it up to rename to upperscase
2. Press F2 and choose Save settings and name the setting: Uppercase
I ended up using this solution with a little tweak to make uppercase just the base filename without extension, so my multi-rename preset has in the first field (Rename mask: file name):

Code: Select all

[U][N][n]
Which means:

Code: Select all

[U] All characters after this position in uppercase
[N] Old file name, WITHOUT extension
[n] All characters after this position again as in original name (upper/lowercase unchanged)
So say 'one.txt' will become 'ONE.txt'
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: rename single filename to UPPERCASE?

Post by *white »

brontosaurusrex wrote: 2025-05-15, 09:16 UTC I ended up using this solution with a little tweak to make uppercase just the base filename without extension, so my multi-rename preset has in the first field (Rename mask: file name):

Code: Select all

[U][N][n]
You may want to add [I] at the beginning.
User avatar
brontosaurusrex
Junior Member
Junior Member
Posts: 23
Joined: 2021-01-01, 17:56 UTC

Re: rename single filename to UPPERCASE?

Post by *brontosaurusrex »

@white, can't find '\[I\]' in help, what is it?
User avatar
Dalai
Power Member
Power Member
Posts: 10013
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: rename single filename to UPPERCASE?

Post by *Dalai »

2brontosaurusrex
TC 11.00 introduced the new placeholder [I]:

Code: Select all

31.05.23 Release Total Commander 11.00 beta 5
[...]
29.05.23 Added: Multi-rename tool: New placeholder [I] or [I1] to ignore dots in folder names ([I0] to return to normal), so [N] contains the entire folder name and [E] is empty after this point (32/64)
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: rename single filename to UPPERCASE?

Post by *white »

brontosaurusrex wrote: 2025-05-15, 10:38 UTC @white, can't find '\[I\]' in help, what is it?
Perhaps you use an old TC version. It is in the help for recent versions:
Help wrote: [I] Ignore dots in folder names from this point forward, so [N] contains the entire folder name, and [E] is empty (no influence on files).
If inserted again, don't ignore dots in folder names any more from that point forward.
User avatar
white
Power Member
Power Member
Posts: 5964
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: rename single filename to UPPERCASE?

Post by *white »

Dalai wrote: 2025-05-15, 10:49 UTC TC 11.00 introduced the new placeholder [I]:
When using older versions but not older than TC 9.10, one could go fancy and use:

Code: Select all

Filename mask: [=tc.directory][N]

Search for:    ^Yes(.+)|No(.+\.)|No(.+)
Replace with:  \U$1$2$3

[X] RegEx
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: rename single filename to UPPERCASE?

Post by *hi5 »

As an alternative suggestion, if you are using a clipboard manager, many offer a change caps feature of the clipboard text, so it would be select part you want to change, copy, invoke it and done. In https://github.com/hi5/CL3/ (my own clipboard manager) it would be select, copy, tap winkey-F 3x to upper case (the number of taps can be changed of course). Sounds tedious but actually quite fast -- you can see it in action here https://github.com/hi5/CL3/wiki/CyclePlugins
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
nsp
Power Member
Power Member
Posts: 1938
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: rename single filename to UPPERCASE?

Post by *nsp »

Same kind of idea as @hi5:
If you use powerpro or AHK or AutoIt, you can define a specific key to copy selected text, transform to upper Case in clipboard, paste Again.
The Challenge to work inside TC edit field is to have a specific hotkey not trapped by TC and not loosing focus.
When entering +[F6] or once R-clicked to edit filename you can cycle with [F6] to exclude extension.

As a sample in powerpro i assigned key [win]c for totalcmd64 to a toUpper.powerpro script.

Code: Select all

clip.IgnoreNext                           ;; DO not monitor next entry
win.sendkeys("{slow}{ctrl}C")             ;; Copy text to clipboard
wait.for(50)
clip.setpaste(case("UPPER",clip.get),0)   ;; Paste latest clipboard value in UPPER CASE
if you want more, you can also use more script to lower case, remove space,..... with a macro.
Post Reply