lonron 当前离线
二级士官
for /f "eol=# tokens=2 delims== " %%x in ('type "test.ini" ^| find /i "xxx"') do (echo %%x)复制代码
评分人数
77七 当前离线
中校
@echo off for /f "eol=# tokens=2 delims== " %%x in ('type "test.ini" ^| find /i "xxx"') do ( del "test.ini" echo %%x ) pause复制代码
TOP
1 找不到 C:\Users\Lonron\Desktop\test.ini 2 找不到 C:\Users\Lonron\Desktop\test.ini 3 找不到 C:\Users\Lonron\Desktop\test.ini 4 找不到 C:\Users\Lonron\Desktop\test.ini 5 找不到 C:\Users\Lonron\Desktop\test.ini 6 找不到 C:\Users\Lonron\Desktop\test.ini 7 找不到 C:\Users\Lonron\Desktop\test.ini 8 找不到 C:\Users\Lonron\Desktop\test.ini 9 找不到 C:\Users\Lonron\Desktop\test.ini 0复制代码
@echo off cd.>1.txt cd.>2.txt for %%a in (*.txt) do ( echo %%a del 2.txt ) pause复制代码
@echo off cd.>1.txt cd.>2.txt for /f "delims=" %%a in ('dir /b /a-d *.txt') do ( echo %%a del 2.txt ) pause复制代码