回来想了想打开文件错误估计是,"%%i"应该改成"%%~dpnxi",你可以再试一下- @echo off
- ::这里把“D:\TEST\”换成自己要扫描的路径
- set "p=D:\TEST\"
- :loop
- for /f "delims=" %%i in ('dir /b %p%\*.*') do (
- set # 2>nul|findstr "#%%i=">nul||QuickPrintA.lnk "%%~dpnxi"
- set "#%%i=1"
- )
- ping -n 2 127.1 >nul
- goto :loop
复制代码
|