[TC (x64) 11.57] Multi-rename using RegEx

English support forum

Moderators: petermad, Stefan2, Hacker

Post Reply
Tachin
Junior Member
Junior Member
Posts: 2
Joined: 2026-05-25, 07:34 UTC

[TC (x64) 11.57] Multi-rename using RegEx

Post by *Tachin »

Trying to rename a file name using the RegEx feature in the multi-rename tool.
1. Old file name: Statement20160215.pdf
2. New file name: Statement (2016-02-15).pdf

Using the following RegEx parameters:
1. Search for: (.*) (\d{4})(\d{2})(\d{2})
2. Replace with: $1($2-$3-$4)

The preview shows correct conversion of file name to: Statement (2016-02-15).pdf

But when executing the renaming via Start! button, pop-up error message of: Error, could not rename the files shown in bold!

Diagnosis conducted:
1. Same source file name, but not using RegEx feature.
2. Target file name required: Statement 20160215.pdf
3. Method:
a) Search: Subject
b) Replace with: Subject_
note: the underscore represents insertion of additional space.
4. Outcome: Success.

Other information:
1. Operating System - Windows 11, version 25H2
2. Total Commander - version x64, 11.57
User avatar
white
Power Member
Power Member
Posts: 6941
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC (x64) 11.57] Multi-rename using RegEx

Post by *white »

Tachin wrote: 2026-05-25, 07:48 UTC Using the following RegEx parameters:
1. Search for: (.*) (\d{4})(\d{2})(\d{2})
2. Replace with: $1($2-$3-$4)
You put the space in the "Search for" field instead of the "Replace with" field. It should be:

Code: Select all

Search for:    (.*)(\d{4})(\d{2})(\d{2})
Replace with:  $1 ($2-$3-$4)
Tachin wrote: 2026-05-25, 07:48 UTC The preview shows correct conversion of file name to: Statement (2016-02-15).pdf

But when executing the renaming via Start! button, pop-up error message of: Error, could not rename the files shown in bold!
Not confirmed. The file is probably locked by a program. Perhaps you had it open?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53143
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC (x64) 11.57] Multi-rename using RegEx

Post by *ghisler(Author) »

Not confirmed, just tried it. Maybe the file was locked by a virus scanner or open in a PDF editor when you tried it?
Author of Total Commander
https://www.ghisler.com
Tachin
Junior Member
Junior Member
Posts: 2
Joined: 2026-05-25, 07:34 UTC

Re: [TC (x64) 11.57] Multi-rename using RegEx

Post by *Tachin »

You are right. I logged out, and re-logged back into to my Windows session and now can use muti-rename as designed. Thank you, and thank you for a great app that I have used for over 20 years.
Post Reply