How to have MS-DOS "remember" logged drive and directory? (Users)
> You could write the current drive into an environment variable with the SET
> command and then read that later on in the batch file with e.g. %my_drive%
Thanks Georg,
That sounds like a simple and straightforward solution to my problem.
But I have to confess that I don't have a clue how to implement it.
I've been trying over and over, and just keep getting error messages. So I'd be grateful for some hints about how to proceed.
My problem has two parts:
1. How to record the path to the current drive and directory,
2. And then how to log back onto that drive and directory later.
I thought I had already figured out how to solve part 1 by writing the output of the CD command to a text file.
So from the MS-DOS 6.21 command prompt I tried this to turn that text into a variable:
SET DIRPATH <e:\temp\dirpath.txt
That seemed to work; as I didn't receive an error message.
But I don't know how to check to see what was actually saved into the %DIRPATH% variable. (It would be helpful to me if I could look at it to make sure that the correct drive and directory path was actually saved to that variable. Could you tell me how to see what that variable now represents?).
But then, when I typed this at the command prompt:
CD %DIRPATH%
I got an "Invalid directory" error message.
So, as you can see, I'm stumbling around in the dark here. Any light you can shed on my path will be gratefully appreciated.
---
Will in Seattle
a.k.a. "Clueless"
Running MS-DOS 6.21
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