Just one more note on spaces in filenames. If you have a whole bunch of
files/directories with spaces in their names, and you want to get rid of the
spaces, here's a small(!) command you can run at the cygwin bash prompt:

Run this one first, which renames all directories under the current
directory from (for example) "dirname with spaces" to "dirname-with-spaces":

# find . -type d | grep -e "\ " | sort | while read d ; do mv -v "${d}" 
  "`echo $d | sed -e 's/\ /-/g' --`" ; done

Obviously remove the leading '#' and put it all on one line. You could of
course make it into a script...

Here's the one I use to remove all spaces from actual files:
# find . -type f | grep -e "\ " | while read f ; do mv -v "$f"
  "`echo $f | sed -e 's/\ /-/g' --`" ; done

Finally, as a bonus, here's a little command I use to rename all files
called "something" to "something.txt" (ie, those without an extension).
You'll have to run the above two commands first, though:

# for f in find . -type f | grep -e
[[:punct:]][[:alpha:]][[:alpha:]][[:alpha:]]$ ;
  do mv -v ${f} ${f}.txt ; done

Cheers,
Matthew van de Werken
Electronics Engineer
CSIRO Exploration & Mining - Gravity Group
1 Technology Court - Pullenvale - Qld - 4069
ph:  (07) 3327 4685     fax:  (07) 3327 4455
email:  [EMAIL PROTECTED]


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 14 March 2002 5:50 PM
> To: Protel EDA Forum
> Subject: Re: [PEDA] spaces in filenames (was: spaces in 
> footprint names)
> 
> 
> G'Day Emanuel (and others):
> 
> No experience with this specifically, but I've learnt from 
> bitter experience
> that spaces in filenames are a Bad Idea(tm), period. I don't care what
> application you're using, as soon as you put spaces in 
> filenames you open up
> a whole can of worms when you're trying to administer your 
> filesystem, due
> to the fact that spaces break many unix-type scripts. Whether 
> or not this
> affects you personally doesn't really matter - the person 
> following you or
> cleaning up your filesystem might care.
> 
> By "unix-type" scripts, I am including cygwin, which only 
> just makes my life
> in a windows world bearable. If I can't have a 'for' loop on 
> a command line
> I am lost!
> 
> Cheers,
> Matthew van de Werken
> Electronics Engineer
> CSIRO Exploration & Mining - Gravity Group
> 1 Technology Court - Pullenvale - Qld - 4069
> ph:  (07) 3327 4685     fax:  (07) 3327 4455
> email:  [EMAIL PROTECTED]
> 
> 
> > -----Original Message-----
> > From: Emanuel Zimmermann [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 14 March 2002 5:18 PM
> > To: Protel EDA Forum
> > Subject: [PEDA] spaces in filenames (was: spaces in footprint names)
> > 
> > 
> > It seems that not only spaces in footprints can cause trouble 
> > but in filenames 
> > also. Yesterday I generated my cam-files from a pcb-file that 
> > I had saved with 
> > "save as..." from the file menu. This by default changes the 
> > filename to "copy 
> > of xyz.pcb". The Gerbers generated from this file seem to be 
> > corrupted somehow. 
> > At least when imported into Camtastic it shows part of the 
> > filename as string in 
> > the middle of rectangular pads. When changing the 
> > pcb-filename to "xyz.pcb" and 
> > running the same cam generator on the same data these strings 
> > within Camtastic 
> > have disappeared.
> > I'm not quiet sure if its Protels or Camtastics problem. Does 
> > anybody of you out 
> > there have more experience with this "feauture", especially 
> > does anybody know if 
> > this impacts PCB production?
> > 
> > Thanx,
> > Emanuel
> > 
> > 
> > 
> > -- 
> > 
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > MPL AG                      www.mpl.ch
> > Emanuel Zimmermann          [EMAIL PROTECTED]
> > Manager R&D                 Phone: +41 (0)56 483 34 34
> > Taefernstrasse 20           Fax:   +41 (0)56 493 30 20
> > 
> > CH-5405 Daettwil
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > 
> 

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* To post a message: mailto:[EMAIL PROTECTED]
*
* To leave this list visit:
* http://www.techservinc.com/protelusers/leave.html
*
* Contact the list manager:
* mailto:[EMAIL PROTECTED]
*
* Forum Guidelines Rules:
* http://www.techservinc.com/protelusers/forumrules.html
*
* Browse or Search previous postings:
* http://www.mail-archive.com/proteledaforum@techservinc.com
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to