home bbs files messages ]

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,503 of 68,980   
   Zaidy036 to All   
   Re: About setlocal/endlocal...   
   11 Feb 20 13:03:24   
   
   From: Zaidy036@isp.invalid   
      
   On 2/11/2020 7:20 AM, Auric__ wrote:   
   > Kenny McCormack wrote:   
   >   
   >> Interesting point here - curious if people have any memory of the history   
   >> of this.   
   >>   
   >> ISTR that, back in the day, setlocal/endlocal did not preserve the current   
   >> directory info on drives other than the current one.  I.e., something like:   
   >>   
   >> C:   
   >> cd X:\foo\bar   
   >> setlocal   
   >> cd X:\Bob\Carol   
   >> endlocal   
   >> cd X:   
   >>   
   >> would display X:\Bob\Carol at the final line.  I.e., it would not get   
   >> restored to X:\foo\bar.   
   >>   
   >> However, I just tested this on an XP system (with CMD.EXE), and it does do   
   >> the right thing.   
   >> (I.e., it goes back to X:\foo\bar)   
   >>   
   >> Am I remembering things wrong, or did this change at some point?   
   >>   
   >> And if it was changed, did it break any existing code?   
   >   
   > I just checked under NT 3.51, XP, and Win7. All acted as expected (i.e.   
   > displayed "X:\Bob\Carol", not "X:\foo\bar"). [shrug]   
   >   
   why not use POPD and PUSHD ?   
      
   --   
   Zaidy036   
      
   --- 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