Creating a batch file that runs a Command Prompt

38,407

I will assume that you are just trying to execute these commands one after another in a batch file?

If so you need to open notepad.

Copy and paste your commands into notepad as you have in your question and click File -> Save As.

Give the file a name i.e. MyBatchFile.bat. Underneath the filename box change the file type to All Files. The .bat on the end of the filename will instruct the PC to open it as a batch file.

Batch files by default open with Command Prompt so all you will have to do is run it.

Share:
38,407
Aaron
Author by

Aaron

Updated on April 08, 2020

Comments

  • Aaron
    Aaron about 4 years

    I want to run this as a batch rather than through the command line:

    w32tm /config /manualpeerlist:bigben.cac.washington.edu /syncfromflags:MANUAL
    net stop w32time & net start w32time
    w32tm /resync