On 17 May 98 at 8:20, Keisuke Seya wrote: > > Name: Keisuke Seya > E-mail address: seya@ti.com > ROOT version: 2.00/06 > Platform: WIN95 > OS: Texas Instruments Japan > > Bug severity: normal > Repro: always > > BUG DESCRIPTION: > Below is the shell command which does nor work: > > .! cd c:\ > > Even the command was issued, the current directory does > not change. I think this is a BUG. > It is not a bug but just a feature. The command does cd but for it's OWN separate process. It does change the current directory but for that process not for ROOT session. The proper way to change the current directory for the ROOT session can be found with tutorials/rootalias.C as follows: root\tutorials\rootalias.C: //_______________________________________________ char *pwd() { return gSystem.WorkingDirectory(); } //_______________________________________________ char *cd(char *path=0) { if (path) gSystem.ChangeDirectory(path); return pwd(); } To load this rootalias.C "by automatic" one should adjust ".rootrc" file and put in into his "home" directory. (For 95 one has to define the home directory himself and set HOME env variable "by hand"). Having completed this from ROOT session one may use: root [0] cd("c:/") or root [0] cd("c:\\") to change the current directory on PC. I'd like to call your attention that with the second "native" form of the directory name one should apply "backslash" TWICE due C/C++ syntax. The "right" slash will work too and it is the prefered method since it is Ok for UNIX and for Windows as well. Hope this helps, Valery ================================================================= Dr. Valeri Faine (Fine) ------------------- Phone: +1 516 344 7806 Brookhaven National Laboratory FAX : +1 516 344 4206 Bldg. 510A /STAR mailto:fine@bnl.gov Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine USA Dr. Valery Fine Telex : 911621 dubna su ----------- LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80 141980 Dubna, Moscow region Fax : +7 09621 6 51 45 Russia mailto:fine@main1.jinr.dubna.su
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:32 MET