How to print a value from a file with comments printed? -
An input name is being named in a program ....
From a file I Read Price Line From Line: Say In File ...
Hello If I want to print
Name of the batch file name in Hello batch file How to do this?
The following (pure CMD ) will do this:
infile.txt ) for prefix @echo off setlocal enabled extension enabled / / %% a (infile.txt) input file for < Hello / pre>
creates this:
Hello name in the batch file name in the batch file
I need to adjust the "name in the batch file" bit to make the script more suitable For example (for example "Bob" ).
Update:
provided you enter Correk Tly name variable for loop Before, you can also use the variable for the name. For example, the following script:
@echo off setlocal enabled extension enabled extension set / p name = Enter name: For / F %% a in (infile.txt) do (Echo %% a! Name!) Endlocals:
c: \ pax>. Enter \ Go.cmd name: Hello Pax, Pax c: \ Pax> _
Comments
Post a Comment