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,747 of 68,980    |
|    Peter to All    |
|    Strange Batch Fil Problem & Fix    |
|    14 Jul 21 07:19:03    |
      From: pmokover@gmail.com              I was updating a batch file I wrote to backup one of my PCs. It kept crashing       at a certain point. For two days I tried various things to fix it with no       luck. I finally guessed at a fix which does work but I don’t understand       what the problem was or        why the fix works. Here are a few lines from the batch file showing the       original version.              (It’s basically a counter/timer loop. When the counter hits 5 seconds it       exits the loop and continues elsewhere in the batch file. It’s the bottom       line that caused the crash.)              =================================       :wait-Z       if %counter%==5 goto Start-N       timeout 1 > nul       set /A counter=%counter%+1       if not exist z:\transfer\batch goto wait-Z       =================================              The fix: in the top line and the bottom line I changed “wait-Z” to “wait       ZZ”              The same thing happened elsewhere in the batch file with “wait-O” which I       had to change to “wait-OO”. The problem does NOT happen with       “wait-N”, “wait-P” or “wait-Y”.              I’m just trying to understand what’s wrong with “wait-Z” and why       “wait-ZZ” works fine.              Possible clue: this happens on only one of my PCs. It’s a new one I built       about two weeks ago. All else seems to be normal with it. Windows 10 Pro       64bit.              Thanks!              --- 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