Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!flims!m-liu From: m-liu@flims (Micky Liu) Newsgroups: comp.sys.ibm.pc Subject: Help with directories and batch files... Message-ID: <4471@columbia.UUCP> Date: Tue, 17-Mar-87 01:44:05 EST Article-I.D.: columbia.4471 Posted: Tue Mar 17 01:44:05 1987 Date-Received: Wed, 18-Mar-87 05:02:52 EST Sender: nobody@columbia.UUCP Reply-To: x1.micky@cu20b.columbia.edu (Micky Liu) Organization: Columbia University Lines: 31 I am trying to use a batch file to: 1) save the current directory 2) goto another directory 3) execute some program 4) return to saved directory I'm having a great deal of trouble trying to get PC-DOS 3.1 to do this. In Unix it would look like: OLDDIR=`pwd` cd \anywhere\i\have\to\go program-that-i-want-to-execute cd $OLDDIR Anybody out there have any idea how I can do this? Step one is the problem here. In the manual it says that DOS remembers the original directory, but it doesn't return to the original directory at the end of the batch file. I tried to write a program to put something in the environment, but that is no good since when the program terminates the newly modified environment goes with it... Thanking you all in advance!!! Micky Liu ARPA: x1.micky@cu20b.columbia.edu UUCP: ...seismo!columbia!cu20b.columbia.edu!x1.micky ...seismo!columbia!flims!m-liu BITNET: malua@cuvmc