January 8, 200917 yr I've got a vbs script which reads argument and takes it as a variable i.e.myscript.vbs /var:1my script reads this asStrMyvar = Wscript.Arguments.Named("var")Is there any way of passing value to var from file in Linux it would look like thismyscript /var:`cat /path/to/file` what is the equivalent of this in DOS?
January 8, 200917 yr To prevent non-functional or completely incorrect attempts at helping you with this problem, could you please try to explain a little better what it is you are trying to do and achieve.
January 15, 200917 yr Author Hi, thanks for response.Let's say I've got a file called myfile with 1 line written in it:c:\windowsIs there any way of calling dos cd comman and pass that line from the file so result would becd c:\windows?Thanks for your help
January 15, 200917 yr Hi, thanks for response.Let's say I've got a file called myfile with 1 line written in it:c:\windowsIs there any way of calling dos cd comman and pass that line from the file so result would becd c:\windows?Thanks for your helpFor /F %%A in (myfile.txt) DO cd %%AThough it would be easier to write the whole line:cd c:\windowsto a file, give it the .bat or .cmd extension and START it.jaclaz
January 15, 200917 yr Author Hey thanks for reply, I tried below:C:\>type h:\filec:\windowsC:\>For /F %%A in (h:\file) DO cd %%A%%A was unexpected at this time. no joy... Can you help please?
January 15, 200917 yr Yes, you use single percentage sign % in command prompt and double %% in batches, I assumed you would have scripted it. jaclaz
Create an account or sign in to comment