在我的BAT文件中,我想从.txt文件中读取这些数据,并且需要将每个数据设置为一个变量
SQLUserName=MFiles
WrapperSQLServerName=usa.com
WrapperDatabase=Wrapper
WrapperAssemblyLocation=D:\Assembly
MFilesNetworkAddress=USA-S1
MFilesVaultName=MF2
MFilesUsername=User
MFilesPassword=
MFilesVaultGUID={26F30-E120-408C-8035-04D85D6}
MFilesWebServerURL=www.WebServer.com
SQLMailProfileName=NoReply
[email protected]
我尝试了这段代码
FOR /F "tokens=2 delims==" %%a IN ('find "WrapperSupportEmail" ^<config.txt') DO SET SupportEmail=%%a
但这会引发错误
find is not recognized as an internal or external command operable program or batch file
请帮我
Thejus电视台
我的代码仅是正确的。唯一的问题是Windows无法找到find.exe。我在同一位置包含了.exe,之后一切正常。
无需添加Find.exe,即可在Win 7和Win 10中正常工作
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句