Is there some
way to slow down the execution to be able to see what is happening?
Yes. A couple of ways. Here's the easiest.
Type:
pause
as the last line.
PAUSE suspends processing of a batch program and displays the message
Press any key to continue . . .
If PAUSE is the last line, the command window stays open until you press
any key, then the command prompt will close.
You can place as many PAUSE commands as you want. You can use PAUSE to
help troubleshoot a batch file. I have to do this quite often. ;-)
Remove PAUSE when you are done troubleshooting and the command prompt
won't stay open when you run the batch file at startup. Or you can rem
it out or
For example...
pausecleanmgr /sageset:99
pausecleanmgr /sagerun:99
pause
Note: The :: is the same as rem. Remark or comment, not a command. With
rem [comment]
comment
Specifies any string of characters you want to include as a comment.
The rem command does not display comments on the screen. Comments are
used to help remember what a command does or whatever, or like above
describes what should happen or you can place your grocery list there if
you want.
You can also use the echo command to display comments if you want.
You can use rem or :: to disable any line that you want to keep for
whatever reason.
Say that a particular line does not work correctly, you want to use the
rest of the batch file and you'll troubleshoot it later. That way the
line is still there so you don'y have to remember it.
If you're as easily amused as I am, save this as a .bat file and run it.
------------below here---------------
echo *****Changes Directory to C:*****
rem soup, chili, crackers, toothpaste
CD C:\
echo *****Changes Directory to C:*****
pauseecho *****Changes the prompt to Hi there*****
PROMPT Hi there $G
echo *****Changes the prompt to Hi there*****
pause
echo *****Directory command with the W switch. Uses wide list
format.***** DIR /W
echo *****Directory command with the W switch. Uses wide list
format.***** pauseecho *****Changes Directory to Windows.*****
CD C:\Windows
echo *****Changes Directory to Windows.*****
pause
echo *****Changes the prompt to eh?*****
PROMPT eh? $G
rem *****Changes the prompt to eh?*****
DIR /W
echo *****Press any key and this window wil close.*****
rem steak, ground beef, pork chops
echo cereal, eggs, bacon
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
echo *****This is the last time, command prompt will close!!*****
pause
------------above here---------------
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In
Double clicking it causes it to flash by very quickly. Is there some
way to slow down the execution to be able to see what is happening?
Thanks again