"Invalid argument"s when attemping to create files with certain characters in filename on external drive

Jon Grant jg at jguk.org
Sun May 27 10:01:23 UTC 2007


> It is a FAT32 file system with it's Windows heritage. When I try to rename 
> a file with Windows XP including one of your invalid characters, it tells 
> me that these characters are forbidden:
>   \/:*?<>|

Danny, you could use a script to rename the offending files, removing 
the characters Nils higlights:

"s/\.\.*/./g;s/,/./g;s/['\`\´&\!?]//g;s/[][()]/./g;s/#/no./g;s/\+/and/g" *

I myself use a longer version, which replaces spaces and brackets as well:


Kind regards

More information about the ubuntu-users mailing list