我目前正在寻找一种通过 txt 文档中的链接在 Windows 批处理文件中设置变量的方法。
例如,如果文本文件显示为:
http://website1.com
http://website2.com
http://website3.com
我希望可以将它们输出到批处理中的变量。示例:
set var1="Line one of text file, ex: http://website1.com"
set var2="Line two of text file, ex :http://website2.com"
set var3="Line three of text file, ex: http://website3.com"
感谢任何帮助,提前致谢!
最佳答案
来啦!玩得开心。
(
set /p var1=
set /p var2=
set /p var3=
)<Filename.txt
让您获得相同的结果!
关于Windows 批处理 : Set Variables from Text File,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5886334/