[comp.os.msdos.misc] saving your current directory in a batch file

lcscigra@watserv1.waterloo.edu (BEST G - PHYSICS) (10/04/90)

Does anyone have a small program that allows you to save what disk and 
directory you a presently in and later return you to that directory?
What I have in mind is something like the following application:

---------------------------------
@echo off
[save current directory]
d:        
cd \wherever 
[run application]            
[return to original directory]
---------------------------------

In short, nothing fancy but good for running applications from anywhere on
the disk, without losing what place you are on the disk. (Ideal for the
helpless using the office software barely knowing what they are doing.)

Thanks for any replies.

- garland

-- 
_____________________________________________________________________________
Garland Best                     | "It is for the blind that I grieve; for
Dept. of Physics                 | their world is one without stars."
U. of Waterloo                   | "When it comes to telescopes, it's not how

ESR@SLACVM.BITNET (Ed Russell) (10/04/90)

>Does anyone have a small program that allows you to save what disk and
>directory you a presently in and later return you to that directory?
>What I have in mind is something like the following application:
>
>---------------------------------
>@echo off
>[save current directory]
>d:
>cd \wherever
>[run application]
>[return to original directory]
>---------------------------------
>
>In short, nothing fancy but good for running applications from anywhere on
>the disk, without losing what place you are on the disk. (Ideal for the
>helpless using the office software barely knowing what they are doing.)

That is a simple matter using functions available in Personal REXX

rreiner@yunexus.YorkU.CA (Richard Reiner) (10/04/90)

ESR@SLACVM.BITNET (Ed Russell) writes:

>>Does anyone have a small program that allows you to save what disk and
>>directory you a presently in and later return you to that directory?

>That is a simple matter using functions available in Personal REXX

Definitely overkill.  I've got a TSR utility called pushdir (with a
companion program popdir) which maintain a six-deep stack of directory
contexts.  The resident, including the dir stack, is under 1Kb.

They're on simtel, in pd1:<msdos.dirutl>.

ts@uwasa.fi (Timo Salmi) (10/05/90)

In article <1990Oct3.191915.27046@watserv1.waterloo.edu> lcscigra@watserv1.waterloo.edu (BEST G - PHYSICS) writes:
>Does anyone have a small program that allows you to save what disk and 
>directory you a presently in and later return you to that directory?

You'll find what you're looking for in the following batch
collection available by anonymous ftp or mail server (if you don't
have ftp) from chyde.uwasa.fi, Vaasa, Finland, 128.214.12.3,
directory /pc/ts. 

TSBAT21.ARC     Batch file collection, T.Salmi
Filename        Comment                             Date      Time    CRC
--------        --------------------------------    ----      ----    ---
ADDPATH.BAT     Append directories to the path    03-04-90  16:31:40  BBB1
APATH-OM.BAT    Otto Makela's version of addpath  01-13-90  12:32:30  BB69
ARC2ZIP.BAT     Single .arc to .zip with comment  02-28-90  12:52:34  9666
BLANK.BAT       Poor man's screen saver           03-28-90  10:42:54  B2C8
C.BAT           Lazy changing of directory        03-14-90  15:39:46  C7EC
COLOR.BAT       Set screen color attributes       06-23-90  20:39:30  80A9
D.BAT           Directory with sort & wildserach  03-04-90  15:40:00  67BF
DAILY.BAT       Run a program only once a day     01-25-90  22:27:02  109A
DELDIR.BAT      Remove directory and its files    02-25-90  18:41:54  61C6
DELPATH.BAT     Delete a directory from the path  01-16-90  12:00:34  EBC6
LASTBOOT.BAT    Show date + time of previos boot  04-15-90  22:33:12  CC6A
LINK1.BAT       How to link batch files together  10-31-89  14:26:14  5946
LINK2.BAT       Batch link demo's second file     11-15-89  12:23:24  3048
LOCATE.BAT      Wildcard file find                01-14-90  11:22:56  3A11
LOGRUN.BAT      Log program usage & time and run  04-15-90  22:46:54  92CC
M.BAT           Give multiple MsDos commands      03-04-90  11:08:08  4256
MAKESURE.BAT    Simple command.com virus warning  01-14-90  11:54:56  4B0F
POPDIRE.BAT     Restore (pop) saved directory     01-14-90  11:57:14  3AF7
POPPATH.BAT     Restore the saved path            01-14-90  11:59:44  5655
PUSHDIRE.BAT    Non-resident push directory       01-14-90  11:58:18  7D9C
PUSHPATH.BAT    Save the current path             01-14-90  11:58:44  BB6D
RUN.BAT         Testing for viruses               01-14-90  12:11:24  EB7D
SCANZIP.BAT     Scan for viruses (incl. lzexed)   06-07-90  12:02:28  4C3D
SCOPY.BAT       Copy a file with a single device  03-18-90  11:50:32  7783
SETCOM.BAT      Secure your command.com           10-28-89  19:41:08  B488
SETPUSHD.EXE    Program for nonresident pushdire  01-13-90  17:33:42  2BBD
SETVAR.BAT      Sets a variable for delpath.bat   01-15-90  22:19:38  875B
SHOW.BAT        Wildcard multifile type command   06-01-90  06:08:16  BBE6
SHOW1.BAT       Auxiliary batch for show.bat      06-01-90  06:07:08  789D
TSBAT.INF       Document                          06-24-90  03:18:22  8FC9
TSBAT.NWS       News concerning this package      06-24-90  03:12:22  1951
TSPROG.INF      List of PD programs from T.Salmi  04-03-90  17:37:40  38AB
UNPACK.BAT      Unpack-test-view any archivetype  03-11-90  17:17:48  047F
VAASA.INF       Info: Finland, Vaasa, U of Vaasa  02-02-90  11:52:54  F6C0
VIRUS.BAT       Another batch-based virus test    03-17-90  20:38:34  CAE6
WHERE.BAT       Generic searchstring fname find   01-14-90  12:02:16  13E3
ZIPDATE.BAT     Equate .zip date to latest file   01-10-90  22:49:00  F131
ZOO2ZIPH.BAT    Single .zoo to .zip on harddisk   03-01-90  11:21:30  BF2F
----            ------             ------  -----
0038             72331              41705   43%

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

mpe@shamash.cdc.com (Mike Ebsen) (10/06/90)

There are a set of utilities called PUSHDIR and POPDIR available from
the new-rag PCMAG.  I think that there might also be a copy archived 
under the msdos:utility subdirectory at the SIMTEL20 site?!?!

ts@uwasa.fi (Timo Salmi) (10/06/90)

In article <26671@shamash.cdc.com> mpe@shamash.UUCP (Mike Ebsen) writes:
>There are a set of utilities called PUSHDIR and POPDIR available from
>the new-rag PCMAG.  I think that there might also be a copy archived 
>under the msdos:utility subdirectory at the SIMTEL20 site?!?!

More precisely pushdir.com and popdir.com can be found eg in the
/pc/pd2/cpcug.zip collection.

The wares are available by anonymous ftp from chyde.uwasa.fi, Vaasa,
Finland, 128.214.12.3, or by using our mail server (use the latter
if, and only if you don't have anonymous ftp).  If you are not
familiar with anonymous ftp or mail servers, I am prepared send
prerecorded instructions on request (provided that your email
address is reachable). 

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

gail@wet.UUCP (Gail Gurman) (10/06/90)

In article <1990Oct3.191915.27046@watserv1.waterloo.edu> lcscigra@watserv1.waterloo.edu (BEST G - PHYSICS) writes:
>Does anyone have a small program that allows you to save what disk and 
>directory you a presently in and later return you to that directory?

I have two suggestions.  PC World publishes a book called PC POWER TOOLS
which includes a disk of very useful utilities.  One pair is PUSHDIR.COM
and POPDIR.COM.  These would be exactly what you want.

My other suggestion is to install 4Dos (there have been other messages
about this and you can ftp it from somewhere).  It has PUSHD and POPD
as internal commands.

Good luck

Gail

-- 
Respond to claris!wet!gail@ames.arc.nasa.gov
        or gail@wet.UUCP