|I use GOTO commands all the time. I have 20-30 commands in one batch file that look in a folder to see if there are any files, if there are it goes to on : if not it goes to another for example dir /b /a-d c:\test\*.* >nul 2>nul && GOTO file |
goto nofile, i don't see any bad practice in this. I think when you get into bad programming is when you do commands like that, that could potentially go either way. For example if you knew there was a possibility of something unexpecteding going into my c:\test folder, my script from the example would pick it up even if I didn't want it to.