1.

Solve : how to stop a command being run in a seperate dos window.?

Answer»

Good day everyone. Haven't been on here in AGES. i stopped making bat files but now
i'm making one to run a series of commands. now i've figured out how to run a command
and the bat file stops till the previous command is finished. Now my problem is when
i run defrag it opens another dos WINDOW to run it. I want it all in the same dos window,
reason being i want to see how it went etc. What i have so far is

Code: [Select]@echo off
start /wait blahblah
start /wait blahblah
start /wait defrag c:
defrag d:
pause

now defrag c runs in another dos window but defrag d will run in same window. How do
i GET defrag c to run in the same dos window?

Thanx in advance for the helpIf you are doing this,

Code: [Select]start /wait defrag c:
defrag d:
and you want defrag c: and defrag d: to appear in the same window...

Why don't you do this?

Code: [Select]defrag c:
defrag d:


because i want it to run c first, then when that's finished i want it to run d if there is a d drive. If there's not im sure it'll give an error.oh i see it worked, THANKS alot.



Discussion

No Comment Found