[wellylug] Blank in file names ?

David Antliff dave.antliff at paradise.net.nz
Fri Apr 23 17:31:05 NZST 2004


On Fri, 23 Apr 2004, E.Chalaron wrote:

> Hi
> Anobody with a recommandation on how to deal with blank spaces in files from
> a windows machine ?
>
> e.g.
> transforming  MY FILE.whatever in MY_FILE.whatever


Are you asking for a renaming scheme, or a renaming tool?

I thought about this for a while some time ago, and in the end decided to
leave the spaces in and then modify all my scripts to properly handle
filenames with spaces in them. For example, 'find' needs the -print0
option to properly delimit a list of filenames with spaces that a program
like xargs (xargs -r0) can handle. Also, programs like mkisofs really
don't like filenames with spaces, so I have a little perl script that puts
'' around all filenames before passing them on.

The shell is meant to deal with all this, but I find it fails
miserably sometimes...


-- 
David.




More information about the wellylug mailing list