I need a little explanation on specifying path to mounted removable disk. My batch code...
wmic LOGICALDISK where driveType=2 get deviceID > "C:\Windows\Temp\wmic.txt"
cls
for /f "skip=1" %%b IN ('type C:\Windows\Temp\wmic.txt') DO (xcopy JKDClean.bat %%b /Y)
for /f "skip=1" %%b IN ('type C:\Windows\Temp\wmic.txt') DO (xcopy run.vbs %%b /Y)
echo -----
echo Cleaning removable disk
for /f "skip=1" %%b IN ('type C:\Windows\Temp\wmic.txt') DO (wscript %%b\run.vbs)
TIMEOUT /T 10 /NOBREAK
echo DONE!!!
echo -----
for /f "skip=1" %%b IN ('type C:\Windows\Temp\wmic.txt') DO (del /s /q /f %%b\*.inf)
Del C:\Windows\Temp\wmic.txt
echo -----
echo DONE!!!
pause
In line 4 "xcopy JKDClean.bat %%b" path is working better. But I couldn't run that vbs file, "wscript %%b\run.vbs". I need that vbs file to be run eithin the removable drive. How specify path for current removable disk???