Strange Search and Replace diacritics error

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: sheep, Hacker, Stefan2, white

User avatar
Senior Member
Senior Member
Posts: 446
Joined: 2013-09-04, 14:07 UTC

Post by *elgonzo »

yard wrote:Great, this works: 
Oh, there is a little problem i can see in your screenshot.

Note that the file extension has been duplicated (.docx -> .docx.docx).

The plug-in returns the file name including the file extension (of course). That means, you should also remove the "[E]" token from the "Extension" text field to avoid duplication of the file extension. Sorry for not thinking about that earlier... :oops:

If you already renamed the files, you can use the Multi-Rename-Tool again to strip the superfluous duplicate file extensions. Just select all files with duplicate file extensions in TC, and invoke the MRT and do the following:
  1. Use the standard tokens "[N]" for the file name mask and "[E]" for the extension.
  2. Tick/enable the RegEx checkbox
  3. Tick/enable the [E] checkbox
  4. Enter the following regex pattern in the "Search for" field: [face=courier]([^.]+)\.\1$[/face]
  5. Make sure you entered (or copy'n'pasted) the regex pattern correctly.
  6. Enter the following into the "Replace with" field: [face=courier]$1[/face]
  7. Verify the result before hitting the Start button :)
(Using the regular expression i have given makes sure that you don't accidentally remove the file extension from files without duplicated file extensions)

The MRT should look pretty much like in this screenshot:
(Note that in my screenshot, only the second file has a duplicated file extension. The first file, not having a duplicated extension, remains unaltered.)
Windows 7 Pro x64 SP1

User avatar
Power Member
Power Member
Posts: 9717
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark

Post by *petermad »

License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' (x64)
TC 3.01b6 on Android 6.0
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

Post Reply