[svlug] copying special files to VFAT

Rafael Skodlar raffi at linwin.com
Sun Nov 11 00:44:01 PST 2001


On Sat, Nov 10, 2001 at 08:48:26AM -0800, Marc MERLIN wrote:
> Sometimes I  have to give files  to people who  don't have linux, so  I copy
> them on a vfat partition on a harddrive and lend the HD.

That's two step work. I would bet a 6pack that you could do it with Samba. 
I don't have the book with me at home to see what needs to be done but 
remember that you can translate CR-LF to LF inside files or vice versa. 
There is a provision for running scripts when the user does something that 
meets criteria.

Just wonder why do you use ':' in filenames that's not an sh convention 
AFAIK. Bash is smart enough to auto escape it
mv tt\:tt
but some shells are not.

> 
> The problem is  that some of my filenames have  characters that aren't valid
> on VFAT (like ':').
> 
> This causes the copy (cp -av) to fail.
> Of course, I can rename the files beforehand to be compatible with VFAT, but
> I  do  not  wish to  compromize  on  the  names  I use  because  windows  is
> restricted.
> 
> I could  also use UMSDOS,  but the  files on the  other side will  then lose
> their name almost entirely.
> 
> What I'd  really like is  some way to have  the characters that  aren't vfat
> compatible renamed on the fly to something else as the file gets written.
> 
> So I have
> cp 'file:name.foobar' /mnt/vfat
> the file would be copied as file!name.foobar
> 
> I can write a perl script to  study the filenames and rename them before the
> copy, but I was  hoping for something a bit simpler than  that, like a mount
> option for the  vfat partition that discards forbidden  characters (I looked
> in the options, but none seemed to do that).
> 
> Did I miss something?
> 
> Marc
> -- 
> Microsoft is to operating systems & security ....
>                                       .... what McDonalds is to gourmet cooking
>   
> Home page: http://marc.merlins.org/   |   Finger marc_f at merlins.org for PGP key
> 

-- 
Rafael
# My login password is misspe11ed name of town 10 km from my birthplace
# and is subject to change without notice!




More information about the svlug mailing list