Hi Charles, cd() is the best way to test if a directory exists. You are right that it would be nice to have a silent cd() for this kind of probing. I'll try to fix this for the next version. CHeers, Fons. On Mon, Aug 28, 2000 at 04:44:53PM -0700, Charles Leggett wrote: > > I need to create a complex directory hierarchy, parts of which may > already exist. I've had a first stab at it, but I'm not pleased with > the solution - no doubt I'm missing things. The problem that I've > encountered, is that there seems to be no way of checking to see > if a directory exists, other than cd()-ing to it, and checking the > return code. This has the side effect of printing out an error message, > which is unwanted in a batch process. > > Can anyone offer any suggestions on a better way to do this? Also, is > there a way to turn off the error/warning messages? > > cheers... Charels. > > > -- > +---------------------------------------------------------------------+ > | Charles Leggett | <CGLeggett@lbl.gov> | > | Lawrence Berkeley National Lab | HCG / NERSC : Atlas / D0 | > | 1 Cyclotron Road, MS 50B-3238 | | > | Berkeley, CA 94720 | Eagles may soar, but weasels don't | > | (510) 495-2930 room: 50B-3201 | get sucked into jet engines. | > +------------------- http://annwm.lbl.gov/~leggett -------------------+ -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET