Remove Special Characters from File Names
Question by Mail Request | 2022-05-05 at 00:48
I got an extensive file collection under Linux Mint, which should now be moved to a Windows PC. Unfortunately, some files can not be copied because of the special characters "%*#><& in the file name.
Is there a possibility with searching and replacing to delete all special characters at once to become compatible with Windows, for example, to replace these characters with the underscore _?
Related Topics
PHP: Remove arbitrary Characters at the Beginning and the End of a String
Tutorial | 0 Comments
Rename File to its Folder Name
Tutorial | 0 Comments
PHP: Check Strings with Ctype-Functions for Character Classes
Article | 0 Comments
MySQL: Line Breaks in MySQL
Tip | 0 Comments
PHP: File Download Script
Tutorial | 0 Comments
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
The easiest way for removing special characters with the help of the FileRenamer is the function:
Of course, you can also solve it with the "Search and Replace" function, but then you would have to work with regular expressions and it becomes a bit more complicated (but you would be more flexible).
Also zum Beispiel:
This would replace all characters in the file name that are not the letters a-z or A-Z or the digits 0-9 with an underscore.
2022-05-05 at 01:18