Q&A for How to Run a Batch File from the Command Line on Windows

Return to Full Article

Search
Add New Question
  • Question
    After I run the batch script, it just opens another line and nothing happens.
    Nicole Levine, MFA
    wikiHow Technology Writer
    Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.
    wikiHow Technology Writer
    Expert Answer
    Many batch scripts won't display any confirmation that the commands have run. If you wrote the batch script yourself, you can switch the value of "echo" to "on" to display the commands at the prompt as they run. You can also add "pause" to the end of the script to make it prompt the user to press a key to continue. But in general, as long as you don't see an error, that means the batch script executed properly.
  • Question
    What does this error mean? '.' is not recognized as an internal or external command, operable program or batch file.
    wikiHow Staff Editor
    Staff Answer
    This answer was written by one of our trained team of researchers who validated it for accuracy and comprehensiveness.
    wikiHow Staff Editor
    Staff Answer
    The batch script is trying to run "." as a command, which is not a recognized command. Look for the extra period somewhere in the script and remove it.
  • Question
    How do I get out after I run my batch file ?
    wikiHow Staff Editor
    Staff Answer
    This answer was written by one of our trained team of researchers who validated it for accuracy and comprehensiveness.
    wikiHow Staff Editor
    Staff Answer
    Just click the '''X''' at the top corner of the command prompt window to close it. Or, if the batch script is hung on a process and not letting you go to the next line, you can press Ctrl + C to stop the batch file from running.
  • Question
    It gives an error saying "The input line is too long. The syntax of the command is incorrect."
    Community Answer
    Double-check the code, as there's a command that was not correctly written. Ensure all spaces and special characters are in the proper places.
Ask a Question

      Return to Full Article