Category : Batch File Utilities - mostly for DOS
Archive   : LASTDIR.ZIP
Filename : LASTDIR.DOC

 
Output of file : LASTDIR.DOC contained in archive : LASTDIR.ZIP


LASTDIR.EXE by Ken Hipple [74076,2331]
Ver. 2.0 Mississippi Data Equipment Company, Inc.
(601) 992-9965

LASTDIR places the current directory path into the environment using the
variable name LAST. After LASTDIR is run the command CD %LAST% can be used
by a batch file to return to the current directory from any directory it may
have changed to. The current drive is put into the environment using the
variable name LASTDRV. Placing %LASTDRV% in a batch file will cause the
batch file to change to the drive that was current when LASTDIR was run.

If there is not enough space to insert the current directory
into the environment a message is displayed and ERRORLEVEL is set to 1. If
there is enough room for the directory but not for the drive a different
message is displayed and the ERRORLEVEL is set to 2.
After LASTDIR finds the environment, it works like SET does.
If LAST/LASTDRV is not already in the environment, LASTDIR places it at
the end of the environment. If LAST/LASTDRV is already in the environment
it is removed from its current location, all entries below it are moved up,
and LAST/LASTDRV is then placed in the environment as the last entry.