Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 10, 2008, 1:31 am
rate this thread
/ : ; * ? " < > |
So when I attempt to copy files which contain any of these characters to
my USB thumb drive which is a fat32 file system, it fails. I don't want
to format the thumb drive as anything else. Is there a script which will
traverse directories and files and strip these characters? I've google'd
groups and the web and can't seem to find anything! I don't want to
reinvent the wheel, but it looks as though I might have to. I'm
attempting this with a shell script, but having difficulties when
traversing sub-directories. Any examples would be appreciated too!
Re: How to filter fat32 illegal characters from directories and files?
Presumably / also, if the FS is to be readable on Win32 systems.
This is pretty trivial using File::Find and File::Copy (since FAT32
doesn't have any useful attributes anyway, the fact File::Copy doesn't
preserve them doesn't matter here).
'Deserve [death]? I daresay he did. Many live that deserve death. And some die
that deserve life. Can you give it to them? Then do not be too eager to deal
out death in judgement. For even the very wise cannot see all ends.'
- » FAQ 3.24 Why don't Perl one-liners work on my DOS/Mac/VMS system?
- — Previous thread in » PERL Discussions