当我使用下面的代码运行批处理文件时,我收到错误The system cannot find the file specified.
。 log.log实际上存在,在任何人为此嗤之以鼻之前。谁知道什么是错的?
:READ
cls
echo Reading definitions...
(
Set /p s1=
Set /p s2=
Set /p s3=
Set /p s4=
Set /p s5=
Set /p s6=
Set /p s7=
Set /p s8=
Set /p s9=
Set /p s10=
)<log.log
答案 0 :(得分:2)
减少冗余并纳入@Squashman的提示:
:READ
cls
echo Reading definitions...
(For /l %%s in (1,1,10) Do Set /p s%%s=)<"%~dp0log.log"