批次内容:
FOR /F "tokens=1,*" %%i IN (list.txt) DO (
cd "%%j"
Echo %CD%
pause
)
执行运行:
C:\Dwn>tmp1.bat
C:\Dwn>FOR /F "tokens=1,*" %i IN (list.txt) DO (
cd "%j"
Echo C:\Dwn
pause
)
C:\Dwn>(
cd "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Administrative Tools"
Echo C:\Dwn
pause
)
The system cannot find the path specified.
C:\Dwn
Press any key to continue . . .
怎么会the system cannot find the path specified
?如果我复制该cd
命令并自行执行它,它工作正常。