

InterviewSolution
Saved Bookmarks
1. |
Solve : Question about error handling in bat or command files? |
Answer» <html><body><p>I have a <a href="https://interviewquestions.tuteehub.com/tag/problem-25530" style="font-weight:bold;" target="_blank" title="Click to know more about PROBLEM">PROBLEM</a> with 1 of the command file but I don’t know how to fix it yet.<br/>And here is the script that causes the problem<br/>Assume I have many .sql script files and I want to run in <a href="https://interviewquestions.tuteehub.com/tag/different-951434" style="font-weight:bold;" target="_blank" title="Click to know more about DIFFERENT">DIFFERENT</a> schema of some database.<br/>The next statement will dump the script to a file call MyScripts.cmd and will run it when the process on line2 is done.<br/>MyScript.cmd looks <a href="https://interviewquestions.tuteehub.com/tag/perfect-1150611" style="font-weight:bold;" target="_blank" title="Click to know more about PERFECT">PERFECT</a> but the process stopped after line2 and line3 and line4 were skipped.<br/>Could you tell me why it skipped line 3 and 4?<br/><br/>Line1: Echo : Before create MyScript.cmd file > MyLog.log<br/>Line2: for %%f in (*.sql) do DoA.cmd %%f<br/>Line3: Echo : Ready to run my script file > MyLog.log<br/>Line4: MyScript.cmd<br/> Quote from: jdang67 on April <a href="https://interviewquestions.tuteehub.com/tag/26-242610" style="font-weight:bold;" target="_blank" title="Click to know more about 26">26</a>, 2010, 09:16:12 AM</p><blockquote><br/>Could you tell me why it skipped line 3 and 4?<br/><br/></blockquote> <br/>if you want to come <a href="https://interviewquestions.tuteehub.com/tag/back-389278" style="font-weight:bold;" target="_blank" title="Click to know more about BACK">BACK</a> after DoA.cmd use CALL.<br/></body></html> | |