我目前正在寻找一种方法来从txt文档中的链接设置windows批处理文件中的变量。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"
任何帮助表示赞赏,在此先感谢!
我的错误,谢谢你! – Dustin 2011-05-04 16:18:51
至于你的问题,我认为你会从bat文件中找到这个难题。你有没有考虑过PowerShell,哪个*可能更容易?你实际使用哪种操作系统/版本? – forsvarir 2011-05-04 16:19:03
目前只是Windows XP Pro。任何建议非常感谢。 :D – Dustin 2011-05-04 16:32:51