1.

Solve : Batch file command to read the sentence at run time?

Answer» <html><body><p>Hi,<br/><br/>I am trying to write a batch file to capture the arguments at run <a href="https://interviewquestions.tuteehub.com/tag/time-19467" style="font-weight:bold;" target="_blank" title="Click to know more about TIME">TIME</a>.<br/><br/>I have to capture the arguments at run time. I am capturing the same using %1 , %<a href="https://interviewquestions.tuteehub.com/tag/2-236987" style="font-weight:bold;" target="_blank" title="Click to know more about 2">2</a> etc.<br/><br/>But the issue is that it is passing one string value as "Indicates an <a href="https://interviewquestions.tuteehub.com/tag/error-25548" style="font-weight:bold;" target="_blank" title="Click to know more about ERROR">ERROR</a>". While capturing the same, I am getting the output as Indicates, rather than the <a href="https://interviewquestions.tuteehub.com/tag/complete-423576" style="font-weight:bold;" target="_blank" title="Click to know more about COMPLETE">COMPLETE</a> sentence.<br/><br/>Is there is any way to capture the complete sentence.<br/><br/>regards,<br/>AtulInstead of using %1, %2 etc. try using <strong>%*</strong><br/><br/> Code: <a>[Select]</a>echo off<br/>set var=%*<br/>echo %var%<br/><br/>Be aware that embedded spaces may cause problems with other commands.<br/><br/> <br/><br/></p></body></html>


Discussion

No Comment Found