重命名文件&文件夹在Windows(7)中递归到[A-ZA-Z0-9-]

发布于 2025-01-19 08:15:06 字数 119 浏览 4 评论 0 原文

我搜索了一个在 Windows (7) 中将文件和文件夹递归重命名为 [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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青巷忧颜 2025-01-26 08:15:06

该解决方案并不是真正完美的。还搜索更好的解决方案。

我对Freecommander XE进行了操作:

此教程仅用于文件。使用文件夹,这在递归方面存在问题,因为具有已更名为父母文件夹的子文件夹未重命名。

提示:请不要小心。您可以重命名所有文件名不可逆!
当您拥有容量时,请使用副本。那不是开玩笑。

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.

特殊(两个)字符信息:
search = aqualent→替代方案

[i don't know] = Ä → Ae
+ñ = ä → ae
+û = Ö → Oe
+Â = ö → oe
+£ = Ü → Ue
++ = ü → ue
[i don't know] = ẞ → SS
+ƒ = ß → ss

[我不知道] =您知道吗?请在评论中写下它。 [问题:此引用的名称是什么?

]
第一:搜索&替换特殊的(两个位)字符,因为,这还不包括特殊字符(请参见下文的正则表达式)。

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!

搜索→更换

+ñ → ae
+û → Oe
+Â → oe
+£ → Ue
++ → ue
+ƒ → ss

搜索:(

search for: + 

您最终发现另一个特殊的char /二char)

对这些搜索与其他char相同。

搜索替换html url编码参考:

实体和字符列表:

在大多数情况下,并非所有参考都存在于文件名中。

但是搜索&用正则表达式替换。
请不要小心!

Select "Replace all occurence".
Select "Exlcude extension".
Select "Regular expression".

搜索→替换:

\W → -

信息:资本W匹配所有字符,除了A-ZA-Z0-9。但是不幸的是,A-ZA-Z0-9包括ñbIS类似,除了它。因此,首先重命名特殊字符(两个)字符。

或使用其他模式:

_|&|\.|\s|\+|\(|\)|=

进一步替换(Umlaute):

Select "case sensitive".
Select "Replace all occurence".

搜索→替换

Ä → Ae
Ö → Oe
Ü → Ue
ä → ae
ö → oe
ü → ue
ß → ss

最后但并非最不重要的一点:
搜索→替换:

Select "Replace all occurence".

_ → -

特殊搜索→替换:
领先的破折号:(

^- → 

重命名为一无所有)
尾随破折号:(

-$ → 

重命名为“一无所有”)

不要忘记每次都单击“重命名”按钮检查更名的文件名。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文