Category : Utilities for DOS and Windows Machines
Archive   : ENV18A.ZIP
Filename : DIRJUMP.BAT

 
Output of file : DIRJUMP.BAT contained in archive : ENV18A.ZIP
@echo off
if .%1==. goto POP
if %1==/? goto HELP
goto PUSH

:HELP
echo Usage: DIRJUMP {Subdir} Save current and go to given directory
echo DIRJUMP Return to previous directory
goto EXIT

:PUSH
env set envtmp1=%1
env set disknow={get*disk},%disknow%
env set dirnow={get*dir},%dirnow%
env set envtmp2=pos(:~%envtmp1%)
env calc envtmp2
if %envtmp2%==0 goto setdir
env set envtmp2=mid(%envtmp1%~1~2)
env calc envtmp2
%envtmp2%
:setdir
env set envtmp2=pos(\~mid(%envtmp1%~length(%envtmp1%)~1))
env calc envtmp2
env set envtmp3=mid(%envtmp1%~1~length(%envtmp1%)-%envtmp2%)
env calc envtmp3
cd %envtmp3%
goto EXIT

:POP
if .%disknow%==. goto EXIT
if .%dirnow%==. goto EXIT
env set envtmp2=pos(,~%disknow%)
env calc envtmp2
env set envtmp1=mid(%disknow%~1~%envtmp2%)
env calc envtmp1
%envtmp1%
env set disknow=delete(%disknow%~1~%envtmp2%)
env calc disknow
if %disknow%==0 env erase disknow
env set envtmp2=pos(,~%dirnow%)
env calc envtmp2
env set envtmp1=mid(%dirnow%~1~%envtmp2%)
env calc envtmp1
cd %envtmp1%
env set dirnow=delete(%dirnow%~1~%envtmp2%)
env calc dirnow
if %dirnow%==0 env erase dirnow
:EXIT
env erase envtmp?


  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : ENV18A.ZIP
Filename : DIRJUMP.BAT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/