To rename files or directories in Total Commander
use the Multi-Rename Tool and such a pattern, e.g.
Polish letters:
Search for: ą|ć|ę|ł|ń|ó|ś|ź|ż
with: a|c|e|l|n|o|s|z|z
mąkę -> make
It must be very simple, I just don't know something.
In Notepad ++ works:
Search for: (ą)|(ć)|(ę)
with: (?1a)(?2c)(?3e)
How to do this in the text?
RegExp. Search for: and Replace with:
- Author
- Message
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
-
Offline
- Posts: 874
- Joined: Sat Jan 16, 2010 2:03 pm
sexy96
Use script "SearchReplace.js":
What:With: Options:
[*] "Regular expressions"
[*] "Replace with function"
Save it as template with any name like "Polish_to_English"
Use script "SearchReplace.js":
What:
Code: Select all
[ąćęłńóśźż]
Code: Select all
return ("acelnoszz".charAt("ąćęłńóśźż".indexOf($0)));
[*] "Regular expressions"
[*] "Replace with function"
Save it as template with any name like "Polish_to_English"
-
Offline
- Posts: 282
- Joined: Thu Sep 10, 2015 9:53 am
- Location: Deutschland
-
Offline
- Posts: 874
- Joined: Sat Jan 16, 2010 2:03 pm
"Jak sobie pościelesz, tak się wyśpisz."sexy96 wrote:"Polish_to_English" Call("Scripts::Main", 1, "SearchReplace.js", `AkelPad.TextReplace(0, "[ąćęłńóśźż]", "return ("acelnoszz".charAt("ąćęłńóśźż".indexOf($0)));", 0x00480001 /*FRF_SELECTION|FRF_REGEXP|FRF_DOWN*/, 1);`) Icon("D:\WinCMD\Icons\2.ico")

1. ToolBar button:
"Polish_to_English" Call("Scripts::Main", 1, "SearchReplace.js", `-Template="Polish_to_English"`) Icon("D:\WinCMD\Icons\2.ico")
2. The template "Polish_to_English" is stored in the "SearchReplace.ini" (codepage = UTF-16LE) file and looks like this:
...
Template8=Polish_to_English=what:/[ąćęłńóśźż]/ with:/return ("acelnoszz".charAt("ąćęłńóśźż".indexOf($0)));/rf
...
3. I don't know how to fix the problem with option "In_selection"
-
Offline
- Posts: 874
- Joined: Sat Jan 16, 2010 2:03 pm
sexy96
It is even easier.
1. In standard dialog "Replace..." {Ctrl+R}
What:With:Options:
[*] "Regular expressions"
2. In "SearchReplace.js" script:
What:With:Options:
[*] "Regular expressions"
It is even easier.
1. In standard dialog "Replace..." {Ctrl+R}
What:
Code: Select all
([\|\(\)\[\]\{\}\\])
Code: Select all
\\\1
[*] "Regular expressions"
2. In "SearchReplace.js" script:
What:
Code: Select all
([\|\(\)\[\]\{\}\\])
Code: Select all
\$1
[*] "Regular expressions"