Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,808 of 68,980    |
|    MikeS to Kenny McCormack    |
|    Re: Question about pushd/popd    |
|    03 Nov 21 08:07:06    |
      From: MikeS@fred.com              On 02/11/2021 20:11, Kenny McCormack wrote:       > CMD.EXE has a version of the pushd/popd commands, obviously based on the       > pre-existing commands in the Unix shells (starting with csh, about 4       > decades ago).       >       > However, as far as I can tell, the DOS/Windows implementations of these       > commands is missing one key functionality - that is, the ability to see       > what is on the stack. That is, to see what you will get if you do "popd".       > And, in fact, IMHO, it's not really worth much to have the stack and to be       > able to "pop" if you have no idea where you're going to pop to.       >       > Note, BTW, that you might argue that you should know where pop is going to       > take you, because you should remember where you were before you did the       > last "push". This may or may not be true, but what if you've push'd       > multiple times? You can't be expected to remember everything, can you?       >       > So, I hope I'm missing something. Is there any way to tell what       > directories are currently in "the stack" ?       >       They are intended to be used in (batch) programs and work the same as       push and pop a register value in languages like MASM. As you said, if       pushd is used several times without popd your program needs to keep       track of the directories pushed and their order. You can only recover a       lower item in the stack by popping off those above first.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca