How To Run Multiple Commands In Batch File

Feb 05, 2011  i need your support cause i'm a newbie about Ms Dos batch. My problem is that i want to run into a batch, two command. The first one has to compress a file and the other has to change the name of the resulting file adding a suffix. The problem i have encountered is that only the first one works, the second one doesn't start.

To run a batch file, follow the steps below for where you want to run the batch file.

How To Run Multiple Commands In Batch File

Batch File With Multiple Commands

Running a batch file from within Windows

A batch file runs like any other executable file by double-clicking the file within Windows. However, because a batch file runs in a command line, it immediately exits when done, so you may only see a black box for a second.

TipFileCommands

If the batch file is closing too fast, or you want to read the output from the batch file, you can edit the batch file and add a pause to the end of the file. The pause command waits for user input before continuing.

Run a batch file from the Command Prompt

How To Run Multiple Commands In A Batch File

To run a batch file, move to the directory containing the file and type the name of the batch file. For example, if the batch file is named 'hope.bat,' you can type 'hope' to execute the batch file.

List Of Batch Commands

Additional information