"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
Hi!
> 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:
rename
"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:
rename
"s/\(//g;s/\)//g;s/\s/_/g;s/\.\.*/./g;s/__*/_/g;s/,/./g;s/[._][._]/./g;s/\.nfo$/.txt/;s/['\`\´&\!?]//g;s/__/_/g;s/[][()]/./g;s/#/no./g;s/\+/and/g"
*
Kind regards
Jon
More information about the ubuntu-users
mailing list