home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Der Mediaplex Sampler - Die 6 von Plex
/
6_v_plex.zip
/
6_v_plex
/
DISK4
/
BUSIN_13
/
2DAY35.ZIP
/
PUSHDIR.DOC
< prev
next >
Wrap
Text File
|
1987-09-06
|
1KB
|
33 lines
PUSHDIR is a two program set that lets you save your current
directory, without knowing what it is, and restoring it at some
later time.
This is very handy for running a program from one directory and
automatically returning to whichever directory you were in before
running the program. And without having to manually keep track of
where you were. This lets you put general batch files in one
directory where instead of in each application directory.
To use the programs in you BAT file do the following:
1. Before changing directories, insert the following command:
PUSHD \NEWDIR
where \NEWDIR is the directory to which you wish to go.
This will save your current directory and move you to the
desired new directory.
2. Run whatever program you wish.
3. Insert the command POPD after the program command line(s).
You will be returned to your original directory.
EXAMPLE:
echo off
pushd \today
today clear %1
popd
This little batch file will run TODAY, which must be run from its
own directory (\TODAY) where database files are found. Upon
completion, you will be returned to whatever directory you were in.