Path: utzoo!mnetor!uunet!husc6!rutgers!iuvax!silver!creps From: creps@silver.bacs.indiana.edu (Steve Creps) Newsgroups: comp.sys.ibm.pc Subject: Re: IBM DOS System Variables Message-ID: <1286@silver.bacs.indiana.edu> Date: 25 Mar 88 03:02:27 GMT References: <1501@ur-tut.UUCP> Reply-To: creps@silver.UUCP (Steve Creps) Distribution: na Organization: Indiana University Computer Science Department Lines: 23 Keywords: IBM, DOS, Directories, batch files 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. It is possible to do from a high-level language like C, or with assembly language. If you don't want to program it yourself, there are PD programs available from various places that do pretty much what you are asking (I assume you want to save the current directory, then change to another directory, then return to the original directory). On Unix the commands pushd and popd are used for this purpose. Pushd saves the current directory, and lets you change directories, whereupon the popd command will take you back to the original dir. I've seen similar PC programs called pushdir and popdir which will accomplish this. If requested I can post them easily, as they take up less than 1K of disk space. On second thought, I'll do it anyway, so please don't send me requests for them. I don't want to be more swamped with mail than I already am. Look for them in the comp.binaries.ibm.pc group soon. - - - - - - - - - - Steve Creps on the 8650 runnin' Ultrix at Indiana University. creps@silver.bacs.indiana.edu (192.12.206.2), ...iuvax!silver!creps, creps@iubacs.bitnet "Hey fellas, it's a four-legged V-8!"