Article View: comp.sys.ibm.pc.programmer
Article #450Re: Current directory from batch file
From: Bruce Williams
Date: Wed, 09 May 1990 17:15
Date: Wed, 09 May 1990 17:15
26 lines
1857 bytes
1857 bytes
There have been many postings of how to do this using simple,
unadulteraed DOS. Well, as clever as they have been, I personally
believe in getting the right tools for the job.
There's a program (actually, there are several around) which lets you
"push" the current directory on a stack and pop it off when you want to
return to it again... many nested levels are allowed. Here's an
example:
[Batch file] pushd // push current path
cd c:\games // go elsewhere...
. // run whatever..
.
popd // return to original path
The version I have is called "push-pop"--about 16K zipped--
written by Paul Roub who includes the C sources and asks no money.
If this can't be found archived somewhere, I'd be glad to email
to any intersted party, (or post it if needed).
----
Bruce R. Williams "Computer Science is not about computers,
University of Utah any more than astronomy is about telescopes"
Salt Lake City - Edgar Dijkstra
Technical Details
Message-ID:
<1990May9.111534.19939@hellgate.utah.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!helios.ee.lbl.gov!hellgate.utah.edu!peruvian.utah.edu!bwilliamReferences:
<90122.175401MCCABE@MTUS5.BITNET> <10153.26405d35@vax1.cc.lehigh.edu> <1873@gannet.cl.cam.ac.uk> <90May7.072047edt.19230@me.utoronto.ca> <5111@lance.hss.bu.oz.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!helios.ee.lbl.gov!hellgate.utah.edu!peruvian.utah.edu!bwilliam From: bwilliam%peruvian.utah.edu@cs.utah.edu (Bruce Williams) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Current directory from batch file Summary: a better way... Message-ID: <1990May9.111534.19939@hellgate.utah.edu> Date: 9 May 90 17:15:34 GMT References: <90122.175401MCCABE@MTUS5.BITNET> <10153.26405d35@vax1.cc.lehigh.edu> <1873@gannet.cl.cam.ac.uk> <90May7.072047edt.19230@me.utoronto.ca> <5111@lance.hss.bu.oz.au> Organization: University of Utah CS Dept Lines: 26 X-Local-Date: 9 May 90 10:15:34 PDT