batch file not allowing new command

January 11, 2011 at 14:51:47
Specs: Windows XP pro, 797mhz/376 mb
so yeah this is literally my first day using batch files so i'm new to most of the commands and just trying things out. i created a batch to run read-only checkdisk (chkdsk/v) and want it to allow me to enter a new command. i know if i type -

that will keep the window open but closes when i hit any key. any ideas how to set it to let me enter a new command after program runs?

(p.s. no keep window open option on desktop icon properties)

See More: batch file not allowing new command

Report •

January 11, 2011 at 15:11:57
Start -> Run -> Type CMD to open the terminal. Type as many command as you want.

This should help you too...

Report •

January 11, 2011 at 20:37:26
thanks but using cmd isn't the issue i'm trying to keep the cmd window open after a batch program is run for when i start with more complex batch files for whatever i may need... basically run batch and window stays open after allowing more commands

Report •

January 12, 2011 at 00:01:11
I dont know what you mean with "stays open after allowing more commands"
Just put your commands after the 'pause'? Batch will execute the commands each for each.


@echo off
echo Command: ipconfig
echo Hit your keyboard to continue . . .
echo You hitted your keyboard..
echo Command: dir /b *.txt
dir /b *.txt
echo Hit your keyboard again to exit.

Happy is ONE who says I am an OttoMAN.

Report •

Related Solutions

January 12, 2011 at 00:30:48
Since you're just starting out, get used to running BATs at the prompt and save yourself a bunch of grief.

Life is too important to be taken seriously.


Report •

January 12, 2011 at 10:18:26
oohh ok so write everything into the script. ok thank you solves my problem

Report •

Ask Question