Rename files and folders to remove forbidden chars
by HTop from LinuxQuestions.org on (#5H7E0)
Hello,
I need a bash (or python) script to rename files and folders (and subfolders, subfiles...) in order to remove chars that are not allowed on Windows NTFS Filesystem (see https://gist.github.com/doctaphred/d...-filenames-txt) that should be these:
<>:"/\|?*
Linux allows to use virtually every char (except from slash and NULL, I think) but on Windows chars like semicolon, colon and some kind of quote are infeasible.
I would like to replace Windows forbidden chars with hypen (or underscore, empty space...no matter).
Can you suggest some script?
Regards,
HTop


I need a bash (or python) script to rename files and folders (and subfolders, subfiles...) in order to remove chars that are not allowed on Windows NTFS Filesystem (see https://gist.github.com/doctaphred/d...-filenames-txt) that should be these:
<>:"/\|?*
Linux allows to use virtually every char (except from slash and NULL, I think) but on Windows chars like semicolon, colon and some kind of quote are infeasible.
I would like to replace Windows forbidden chars with hypen (or underscore, empty space...no matter).
Can you suggest some script?
Regards,
HTop