1.

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

Answer»

Hi,

I am trying to write a batch file to capture the arguments at run TIME.

I have to capture the arguments at run time. I am capturing the same using %1 , %2 etc.

But the issue is that it is passing one string value as "Indicates an ERROR". While capturing the same, I am getting the output as Indicates, rather than the COMPLETE sentence.

Is there is any way to capture the complete sentence.

regards,
AtulInstead of using %1, %2 etc. try using %*

Code: [Select]echo off
set var=%*
echo %var%

Be aware that embedded spaces may cause problems with other commands.

 



Discussion

No Comment Found