home *** CD-ROM | disk | FTP | other *** search
- @Echo Off
- Rem Save current drive and directory for later return by POPD
- Rem (maximum nesting level: 9; may be extended)
- Rem Assumes room for temporary batch file on drive C:
- Set temp=
- If "%dir9%" == "" Set temp=9
- If "%dir8%" == "" Set temp=8
- If "%dir7%" == "" Set temp=7
- If "%dir6%" == "" Set temp=6
- If "%dir5%" == "" Set temp=5
- If "%dir4%" == "" Set temp=4
- If "%dir3%" == "" Set temp=3
- If "%dir2%" == "" Set temp=2
- If "%dir1%" == "" Set temp=1
- If "%temp%" == "" Goto pushdstackfull
- echosys Set dsk%temp%=^:^x0d^x0aSet dir%temp%=^\^x0d^x0adel c:\temp$$$$.bat>c:\temp$$$$.bat
- Set temp=
- c:\temp$$$$.bat
- Rem We never fall through to here!
- :pushdstackfull
- Echo Stack is full!
- :pushdend
-