Renaming Files to Be FAT32-Compatible - Bash Script
I regularly copy files onto USB sticks or SD cards that are formatted with FAT32. And every time there is trouble with file names that contain characters FAT32 does not allow. Colons, question marks, asterisks, everything that is completely normal under Linux becomes a problem on FAT32. So I wrote myself a Bash script that takes care of the work. It searches the current folder, replaces all invalid characters, and also takes care of leading or trailing spaces and dots. Collisions are avoided by appending a counter. ...