开发者

Is it possible that text file be used as input of batch file?

开发者 https://www.devze.com 2023-01-29 04:28 出处:网络
Say I had this in a text file: file.txt Is it possible to import this into a batch file, not just being type on screen but being used as a command? I thought maybe开发者_开发技巧 something like th

Say I had this in a text file:

file.txt

Is it possible to import this into a batch file, not just being type on screen but being used as a command? I thought maybe开发者_开发技巧 something like this:

%input% < file.txt


this reads the first line from a Textfile into a variable:

set /p Input=<file.txt


You'll have to use the "more" command to check the contents of the text file.

0

精彩评论

暂无评论...
验证码 换一张
取 消