Path: utzoo!mnetor!uunet!husc6!bbn!rochester!ur-tut!akk2 From: akk2@ur-tut (Atul Kacker) Newsgroups: comp.sys.ibm.pc Subject: Re: IBM DOS System Variables Message-ID: <1520@ur-tut.UUCP> Date: 25 Mar 88 19:29:00 GMT References: <1501@ur-tut.UUCP> <1286@silver.bacs.indiana.edu> <5074@sigi.Colorado.EDU> Reply-To: akk2@tut.cc.rochester.edu.UUCP (Atul Kacker) Distribution: na Organization: Univ. of Rochester Computing Center Lines: 40 Keywords: IBM, DOS, Directories, batch files In article <5074@sigi.Colorado.EDU> murillo@boulder.Colorado.EDU (Rodrigo Murillo) writes: >In <1286@silver.bacs.indiana.edu> creps@silver.UUCP (Steve Creps) writes > >>In article <1501@ur-tut.UUCP> nsto@ur-tut (Natalie Stone) writes: >>>Is there a way to assign a variable from within a batch file to be >>>equal to the current directory name so it can then be used in >>>the batch file. >> >> Not really with just MS-DOS batch files. >> [ references to pushdir/popdir and sugestions to try a high level language] >Who said it could not be done?? > >Yes folks, batch files are fun! I devised a way to store the current >directory and return to it from a DOS batch file. It isn't particularly >pretty, but it is handy if you don't have things like popdir/pushdir yet. > > .... stuff deleted ..... I think this is not really what Natalie is after. It is easy to use pushdir/ popdir or something else to return to the same directory etc. What she wants is being able to define an environment variable, called say CURDIR, that would be equal to the current path. e.g. If the batch file is run from C:\USR\BIN, it should set the environment variable CURDIR = C:\USR\BIN. This environment variable could then conceivably be used in another application program. -- ------------------------------------------------------------------------------- Atul Kacker | Internet: akk2@tut.cc.rochester.edu | UUCP: {ames,cmcl2,decvax,rutgers}!rochester!ur-tut!akk2 -------------------------------------------------------------------------------