for /f "delims=" %%i in (.\tasklist.txt) do ( echo %%i ) **显示 %%i was unexpected at this time我在另外个批处理里边也是这么用的,Why?

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 09:45:20
for/f"delims="%%iin(.\tasklist.txt)do(echo%%i)**显示%%iwasunexpectedatthistime我在另外个批处理里边也是这么用的,Why?for

for /f "delims=" %%i in (.\tasklist.txt) do ( echo %%i ) **显示 %%i was unexpected at this time我在另外个批处理里边也是这么用的,Why?
for /f "delims=" %%i in (.\tasklist.txt) do ( echo %%i ) **显示 %%i was unexpected at this time
我在另外个批处理里边也是这么用的,Why?

for /f "delims=" %%i in (.\tasklist.txt) do ( echo %%i ) **显示 %%i was unexpected at this time我在另外个批处理里边也是这么用的,Why?
%%i是在批处理文件里面的用法,即你需要报上面这个命令写入一个.bat或.cmd命令中,然后执行; 如果是在命令行下直接执行,则只需要用一个%,即上面写成:
c:\temp>for /f "delims=" %i in (.\tasklist.txt) do (echo %i )
假设你在C:盘的temp目录下执行这个命令,而且c:\temp下有tasklist.txt这个文件.