Windows – Why does Windows command prompt stalls until a key is pressed when executing long batch files or programs

command-line-interfaceexecutablewindows

I've just had two occurrences of windows 7 stalling an execution until I hit enter on the command prompt/powershell. Afterward execution seems to continue as expected.

First was an batch file of copy commands like

copy //host/file2010-1*xml localfolder/01/
copy //host/file 2010-2*xml localfolder/02/

One file seemed to be taking ages. I checked the folder and it was complete, hit enter and suddenly it burst back into life to get the rest.

Second is a java program (an ETL job) in powershell which paused as it was about to output SQL duplicate key warnings. I cannot confirm if actual execution stalled but I suspect not. I have just repeated this one as I type.

Also my more experienced colleague has seen the same thing with .net programs he has written.

How can I avoid this? What am I missing? Does Windows get lonely and need a gentle push?

Best Answer

edit the settings on the command shell that you've opened up its been set to quick edit mode which you don't want in this case.