🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #375

Current directory from batch file

#375
From: Jim McCabe
Date: Wed, 02 May 1990 22:54
19 lines
1326 bytes
I'm sure this is a simple question, but I've only recently started writing
batch programs that had any complexity at all.  I would have avoided it
if possible, but my job demands it.  :(

Is there any way to find out what the current directory (and current drive
for that matter) is from within a batch file?  I am working on a program
that changes directories all over the place, and it would be very nice
to be able to place the user back in the original directory before terminating.

In Unix there is an environment variable that always holds the current
working directory, but the manual doesn't seem to say anything about it.
Can anyone help me out at all on this one?  I'd rather keep it all
within a single program, if possible.  We're using DOS 3.30 here.

Thanks!


                                                Jim McCabe
                                                MCCABE @ MTUS5.BITNET
Technical Details
Message-ID: <90122.175401MCCABE@MTUS5.BITNET>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!psuvm!cunyvm!ndsuvm1!mtus5!mccabe

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!psuvm!cunyvm!ndsuvm1!mtus5!mccabe
From: MCCABE@MTUS5.BITNET (Jim McCabe)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Current directory from batch file
Message-ID: <90122.175401MCCABE@MTUS5.BITNET>
Date: 2 May 90 22:54:01 GMT
Organization: Computing Technology Services, Michigan Technological Univ.
Lines: 19