PUSHD and POPD in MS-DOS 6.21? (Users)
> A BBS friend suggested I try PUSHD and POPD but I can't find them in my
> MS-DOS 6.21 manual.
These were introduced in Windows' cmd.exe.
> I'm wondering if DOS 6.21 might have equivalent commands, or if there's a
> way to get MS-DOS 6.21 accomplish the same thing using existing commands.
(Untested) from batfaq23.zip:
9. JUMP BACK TO PRIOR DRIVE / DIRECTORY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Q: When I run a program or command how can I get back to the
directory that was current prior to command execution ?
A: Several solutions are available as small utilities but
below is a pure DOS solution.(using environment variables)
(4DOS has built in variables to deal with this situation)
::Set Envars to current drive & current directory
@echo @prompt SET OLDRV$Q$N$_SET OLDIR$Q$P >C:\TEMP$TMP.BAT
@%COMSPEC% /e:1024 /c C:\TEMP$TMP.BAT >C:\TEMP$$MP.BAT
@call C:\TEMP$$MP.BAT >nul
@del C:\TEMP$?MP.BAT
Once this BATch has been CALL'd or run:
%OLDRV% will be evaluated to be the drive when BAT was run
and %OLDIR% will be evaluated to be the prior directory.
---
Forum admin
Complete thread:
- MS-DOS command to show logged drive and directory? - CluelessInSeattl, 08.03.2013, 16:45 (Users)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- MS-DOS command to show logged drive and directory? - bretjohn, 08.03.2013, 16:50
- MS-DOS command to show logged drive and directory? - CluelessInSeattl, 08.03.2013, 19:58
- MS-DOS command to show logged drive and directory? - rr, 08.03.2013, 20:32
- MS-DOS command to show logged drive and directory? - CluelessInSeattl, 08.03.2013, 22:51
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 10.03.2013, 20:02
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 11.03.2013, 00:31
- PUSHD and POPD in MS-DOS 6.21? - glennmcc, 11.03.2013, 00:54
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 11.03.2013, 02:06
- PUSHD and POPD in MS-DOS 6.21? - glennmcc, 11.03.2013, 03:39
- PUSHD and POPD in MS-DOS 6.21? - marcov, 11.03.2013, 20:28
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 11.03.2013, 02:06
- PUSHD and POPD in MS-DOS 6.21? - rr, 11.03.2013, 21:01
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 11.03.2013, 23:34
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 12.03.2013, 00:24
- PUSHD and POPD in MS-DOS 6.21? - glennmcc, 12.03.2013, 02:07
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 12.03.2013, 00:24
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 11.03.2013, 23:34
- PUSHD and POPD in MS-DOS 6.21? - glennmcc, 11.03.2013, 00:54
- How to have MS-DOS "remember" logged drive and directory? - ron, 11.03.2013, 05:22
- How to have MS-DOS "remember" logged drive and directory? - georgpotthast, 11.03.2013, 08:00
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 11.03.2013, 15:39
- How to have MS-DOS "remember" logged drive and directory? - bretjohn, 12.03.2013, 00:39
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 12.03.2013, 00:59
- How to have MS-DOS "remember" logged drive and directory? - nidud, 12.03.2013, 12:45
- How to have MS-DOS "remember" logged drive and directory? - ron, 12.03.2013, 13:02
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 12.03.2013, 18:42
- How to have MS-DOS "remember" logged drive and directory? - RayeR, 13.03.2013, 01:26
- How to have MS-DOS "remember" logged drive and directory? - bretjohn, 13.03.2013, 04:12
- How to have MS-DOS "remember" logged drive and directory? - RayeR, 13.03.2013, 01:26
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 12.03.2013, 18:42
- How to have MS-DOS "remember" logged drive and directory? - bretjohn, 12.03.2013, 17:03
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 12.03.2013, 00:59
- How to have MS-DOS "remember" logged drive and directory? - j_hoff, 13.03.2013, 21:44
- How to have MS-DOS "remember" logged drive and directory? - bretjohn, 12.03.2013, 00:39
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 11.03.2013, 15:39
- How to have MS-DOS "remember" logged drive and directory? - georgpotthast, 11.03.2013, 08:00
- PUSHD and POPD in MS-DOS 6.21? - CluelessInSeattl, 11.03.2013, 00:31
- How to have MS-DOS "remember" logged drive and directory? - CluelessInSeattl, 10.03.2013, 20:02
- MS-DOS command to show logged drive and directory? - CluelessInSeattl, 08.03.2013, 22:51
- MS-DOS command to show logged drive and directory? - bretjohn, 08.03.2013, 16:50
Mix view