1.

Solve : Issue in batch file execution in Windows 2008 server?

Answer» <html><body><p>Hello guys,<br/><br/>Need your expert advice in this. I have been facing issue in a cmd file. I was executing some set of <a href="https://interviewquestions.tuteehub.com/tag/command-11508" style="font-weight:bold;" target="_blank" title="Click to know more about COMMAND">COMMAND</a> in a batch file. I want the second command execute after the first command completes.<br/><br/>My scenario <br/><br/>1st cmd :start tdpexcc - will execute the backup of an exchange DB ( backup ll run at the background)<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/2nd-300843" style="font-weight:bold;" target="_blank" title="Click to know more about 2ND">2ND</a> cmd : <a href="https://interviewquestions.tuteehub.com/tag/tail-771826" style="font-weight:bold;" target="_blank" title="Click to know more about TAIL">TAIL</a> - 20 output of backup completion status to another file<br/><br/>What happens is the second cmd executes even before the process started by first command completes. Kindly help me in resolving this<br/><br/>Thanks<br/>I'd add a delay in between both instructions <a href="https://interviewquestions.tuteehub.com/tag/using-1441597" style="font-weight:bold;" target="_blank" title="Click to know more about USING">USING</a> SLEEP. I haven't tested SLEEP on Server 2008 but it worked on 2000 and 2003 servers when added.Because you are using the START command without the WAIT option. But even then some <a href="https://interviewquestions.tuteehub.com/tag/programs-239435" style="font-weight:bold;" target="_blank" title="Click to know more about PROGRAMS">PROGRAMS</a> don't obey the wait option. So just execute the first command without the START command.<br/><br/>c:\path\tdpexcc.exe<br/>Tail.exe -20 logfile.log</p></body></html>


Discussion

No Comment Found