回3楼
@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('fsutil fsinfo drives ^|find /v ""') do (
set div=%%i
set div=!div:~-3,3!
fsutil fsinfo drivetype !div! | find "固定" >nul&&(
for /f "tokens=*" %%j in ('dir /b /s !div!lovecmd.txt 2^>nul') do (
set pat=%%~fsj
for /f "delims=" %%a in (!pat!) do (
set str=%%a
set str=!str:lovecmd=lovebat!
)
)
)
)
echo !str!>!pat!
start "" "%pat%"