Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,451 of 42,547    |
|    alexganegama@gmail.com to Alex Stankevich    |
|    Re: Syntax checker for MS-DOS batch scri    |
|    25 May 16 15:11:34    |
      8b818dc3       On Tuesday, July 12, 2011 at 1:41:30 AM UTC+10, Alex Stankevich wrote:       > This is a basic question, however, I've been looking through the FAQ,       > googling, and reading the CMD.EXE docs, but could not find any       > information on how to check the syntax of a bat script without       > actually executing it. Is there some way of doing this (e.g.       > equivalent to bash -n)?       >       > Thanks,       > Alex.              Is something wrong with this?              cls       @ECHO OFF       title Shutdown, Restart or Logoff       echo Would you like to Shutdown, Restart, Logoff or Cancel?       set/p "cho=>"       if %cho%==Restart goto Restart       if %cho%=Shutdown goto Shutdown       if %cho%==Logoff goto Logoff       if %cho%==Cancel goto Cancel       if else goto FAIL                                                                                    :Restart       echo Restarting...       shutdown.exe /r              :Shutdown       echo Shutting Down...       shutdown.exe /p              :Logoff       echo logging Off       shutdown.exe /l              :Cancel       taskkill /im cmd.exe              :FAIL       echo Invalid Choice              --- 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