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 68,440 of 68,980    |
|    Zaidy036 to Herbert Kleebauer    |
|    Re: Replace line in a txt file with miss    |
|    11 Jan 24 16:37:18    |
      From: Zaidy036@air.isp.spam              On 1/11/2024 11:31 AM, Herbert Kleebauer wrote:       > On 11.01.2024 17:03, Zaidy036 wrote:       >> On 1/11/2024 10:30 AM, Herbert Kleebauer wrote:       >>> On 11.01.2024 16:09, Zaidy036 wrote:       >>>       >>>> Batch window closed and _NW-N.txt not generated.       >>>       >>> Did you start the batch with a double click in explorer?       >>> Then insert a pause at the end of the batch to see the       >>> error message. Or better start the batch within an open       >>> CMD window       >>>       >>> If you started the batch within an opened CMD window       >>> and the CMD window is closed when you execute the batch,       >>> then you have a seriously problem. In this case simplify       >>> the batch code until it doesn't crash and then add       >>> code until you find the critical part of the code.       >>>       >>>       >> basically that is what I did and the addition of the cmd shown closes       >> the batch window but when run with an open cmd window and NOT by batch       >> it works correctly       >       > You still didn't said how you start the batch.       >       > Open a cmd window. CD to the directory where the batch       > is stored. Name your batch test.bat so there is no name conflict       > with a program with the same name and type test.bat to       > execute the batch. Then you should see the error messages.              OK, learning something about how to see errors after a batch closure.              The reported error: ) was unexpected at this time.              But NOT really. After trying various different ( and ) arrangements       without success I did get it to work.              The fix was changing "IF %B==..." to "IF %%B==..."              But you had success using "IF %B==..." and maybe a different version of       Windows 10. Mine is Pro (10.0.19045 build 19045).              --- 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