[techtalk] Removing spaces form Windows File names

karina.hould at autodesk.com karina.hould at autodesk.com
Thu Jun 1 06:05:38 EST 2000


Hello,


thanks for the info I will try it out,
Actually what I am doing is Migrating everything to Linux, so all the
Windows File thingy's are copied over to a Linux filesystem and well I kind
of want to get rid of Windows all together.

should I change the command to something else due to the fact that my files
are on the Linux Filesystem?

I will let you know if you amazing once I try it out <Smile>

thanks

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