[techtalk] Removing spaces form Windows File names
karina.hould at autodesk.com
karina.hould at autodesk.com
Thu Jun 1 06:39:07 EST 2000
Jeff,
Well I must be doing something wrong, it is telling me
find: missing argument to '-exec'
sed: -e expression #1, char 7: unknown option to 's'
I appreciate your help on this,
I know that Gnome has no problem reading the spaces in the file names. so it
is not so urgent, only the Directories with spaces are a problem.
thanks again
Karina
-----Original Message-----
From: Jeff Dike [mailto:jdike at karaya.com]
Sent: June 01, 2000 09:52
To: techtalk at linuxchix.org
Subject: Re: [techtalk] Removing spaces form Windows File names
karina.hould at autodesk.com said:
> Is there a file I can create that will do this? I am not a programmer,
> so I have limited knowledge in creating files but I can sure try...
> Any help you could provide would be amazing.
I don't think I could pass up a chance to be amazing :-)
find /dos -name "* *" -exec sh -c 'echo {} | (read f ; mv "$f" `echo $f |
sed
"s/ //g"`)' \;
ought to do the trick, assuming all those files are under /dos. It does
give
me a find error on one file in my test directory, but the move happened. It
was also harder than I expected.
However, I don't think you should do this without explaining why you think
you
need to. Did some window-y thing dump a bunch of spacey filenames into your
Linux filesystem or are you trying to change all the spacey filenames on a
windows filesystem?
Jeff
_______________________________________________
techtalk mailing list
techtalk at linuxchix.org
http://www.linux.org.uk/mailman/listinfo/techtalk
More information about the Techtalk
mailing list