Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdcsu.UUCP Path: utzoo!watmath!watnot!watdcsu!broehl From: broehl@watdcsu.UUCP (Bernie Roehl) Newsgroups: net.micro.pc Subject: Re: where are you after a batch file Message-ID: <2063@watdcsu.UUCP> Date: Wed, 5-Feb-86 09:25:40 EST Article-I.D.: watdcsu.2063 Posted: Wed Feb 5 09:25:40 1986 Date-Received: Thu, 6-Feb-86 04:45:42 EST References: <440@tekig5.UUCP> <1130@ecsvax.UUCP> <203@intelca.UUCP> <51@gumby.UUCP> Reply-To: broehl@watdcsu.UUCP (Bernie Roehl) Organization: U of Waterloo, Ontario Lines: 21 In article <51@gumby.UUCP> g-tsang@gumby.UUCP (Michael H. Tsang) writes: > > In responding to the question of "where are you after a batch file?", I >have written the following programs in Turbo Pascal. They are "pushd.pas" and >"popd.pas". These programs simulate the corresponding pushd and popd commands >in UNIX. It requires you to set up a file named "dirstack" in the directory >"c:\tmp", but it can be changed by changing the constant StackFileName. First, thanks to Michael Tsang for taking time to write and post these programs. Now, a suggestion: why doesn't somebody write a program that either (a) keeps the directory stack in the environment, instead of having to have a writeable file sitting around on disk and doing disk accesses for directory pushing/popping? Another approach would be a tiny program that gets the current directory and then executes a fresh copy of command.com; when you exit, the program would restore the current directory and then exit. This avoids scratch files and large environments, but takes up a few K of extra ram for the fresh copy of the command interpreter. Just some ideas...