Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirm each line of batch file under XP

Status
Not open for further replies.

jrbarnett

Programmer
Jul 20, 2001
9,645
0
0
GB
DOS 6.2x allowed you to confirm each line of a batch file with

COMMAND /Y /C batchfile

and it would let you confirm the execution of each line with a [Y/N] prompt afterwards. Great for debugging.

Is there equivalent functionality under XP Pro SP2, we have a very complex batch file here that falls over, and have no idea really which line it falls over on.
Its not in cmd.exe or the command.com supplied with XP SP2.

Google doesn't come up with questions on being able to run batch files one line at a time under Windows XP.

John
 
Looks like the same as I've found before - its asking how to resurrect this feature.

The batch file is around a hundred lines long, and has branches based on errorlevel values set on the results of calling these executables with various parameters.

I'll see if I can redo the client side implement with a Windows 98SE VM client so it can be run using command /y /c, but don't hold out much hope.

As its a commercial product (my colleague and I have already stumped their support desk), I don't really want to go editing a copy to add in extra pause messages or displaying progress indicators or displaying of variables in case it affects code execution.

John
 
Ya know, you could attack this a different way. You could start by adding some debug logging into the code at various parts of the script. I have done this in the past to get an idea where a script is failing. For instance, when the script reaches a certain point, it could echo a message into a logfile stating that it reached that point in the script (make sure to have it log date and time as well, quite useful). Once you identify the area where it's failing, you could get more granular with your debug entries in order to fully isolate the exact spot at which the script is failing.

- Ravashaak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top