'Rename files & folders recursively in Windows (7) to [A-Za-z0-9-]
I search a solution to rename files and folders recursively in Windows (7) to [A-Za-z0-9-].
I will post a question, but this is not perfect and without folder rename. I search also for a better solution. A batch file is welcome.
Solution 1:[1]
This solution is not realy perfect. Also search for a better solution.
I have do it with FreeCommander XE:
This tutorial works only recursively for files. With folder, this have a problem with recursively, because subfolder with already renamed parent folder are not renamed.
Hint: Please be absolutely carefull. You can rename all filenames irreversible!
When you have the capacity, make it with a copy. That is not a joke.
Open the Folder in a tab.
Check, that the tab with the folder is active (bold path name).
Click the "Search" icon.
It opens a new window.
File name: *
Click "Find".
Mark all Files.
Menue: File ? Export to file container ? Export selected items
It opens all the files in a temporary folder in a new tab in the main window.
In this (C:TmpFileContainer-1.fcc) please mark only all files.
Menue: File ? Multirename
It opens a new window.
Special (two bit) chars INFO:
search = aequivalent ? alternative
[i don't know] = Ä ? Ae
+ñ = ä ? ae
+û = Ö ? Oe
+Â = ö ? oe
+£ = Ü ? Ue
++ = ü ? ue
[i don't know] = ? ? SS
+ƒ = ß ? ss
[i don't know] = you know it? please write it in a comment. [Question: What is the name of this References?]
In the Multirename window:
First: search & replace the special (two bit) chars, because, this have not special chars included (see below at regular expression).
Select "Replace all occurence".
Select "Exlcude extension".
And Select "Auto Preview" and check the result befor click the "Rename" button.
After the rename click "Reload".
Please be absolutely carefull!
search ? replace
+ñ ? ae
+û ? Oe
+Â ? oe
+£ ? Ue
++ ? ue
+ƒ ? ss
Make a new search:
search for: +
(you find eventually an another special char / two bit char)
Do the same with these as with the others.
Search an replace for HTML URL Encoding Reference:
List of entities and characters: https://www.w3schools.com/tags/ref_urlencode.asp
In most cases not all references are present in the filenames.
Yet search & replace with Regular expression. Please be absolutely carefull!
Select "Replace all occurence".
Select "Exlcude extension".
Select "Regular expression".
search ? replace:
\W ? -
Info: The capital W match all chars, except a-zA-Z0-9. But a-zA-Z0-9 included unfortunately ñ û Â and similar and except it. Therefore first rename the special (two bit) chars.
Or use an another pattern like this:
_|&|\.|\s|\+|\(|\)|=
Further replaces (Umlaute):
Select "case sensitive".
Select "Replace all occurence".
search ? replace
Ä ? Ae
Ö ? Oe
Ü ? Ue
ä ? ae
ö ? oe
ü ? ue
ß ? ss
Last but not least:
search ? replace:
Select "Replace all occurence".
_ ? -
Special search ? replace:
Leading dashes:
^- ?
(rename to nothing)
Trailing dashes:
-$ ?
(rename to nothing)
Don't forget to check the renamed filenames every time befor click the "Rename" button.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Malama |
