Article 5H7E0 Rename files and folders to remove forbidden chars

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,
HToplatest?d=yIl2AUoC8zA latest?i=flzD4VdtlCY:KxWxvpA2-wA:F7zBnMy latest?i=flzD4VdtlCY:KxWxvpA2-wA:V_sGLiP latest?d=qj6IDK7rITs latest?i=flzD4VdtlCY:KxWxvpA2-wA:gIN9vFwflzD4VdtlCY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments