55 Votes

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 _?

8Best Answer10 Votes

The easiest way for removing special characters with the help of the FileRenamer is the function:

  • Delete Character Groups -> Special Characters

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:

Search for:   [^a-zA-Z0-9]
Replace with: _
Check option "Interpret as Regular Expression"

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

ReplyPositive Negative

Related Topics

Rename File to its Folder Name

Tutorial | 0 Comments

PHP: File Download Script

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.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.