I am writing a batch file that copies files from all the removable drives inserted that match a certain disk label. In this case "VIDEO"...
Existing code simply displays the detected drives and asks user to input themselves the drive letters.
It should never be more than 4 drives but should display an error if there are more than 4 detected.
QUESTION: How can I automatically set disk1, disk2, disk3, disk4 instead of forcing the user to do this?
EXISTING CODE:
echo Here are the drive letters of VIDEO cards inserted:
for /f %%D in ('wmic volume get DriveLetter^, Label ^| find "VIDEO"') do echo/|set /p ="%%D "
set "drive1="
if "%drive1%"=="" if %Cards% geq 1 set /p drive1= What is the FIRST video drive letter (example: d:):
set "drive2="
if "%drive2%"=="" if %Cards% geq 2 set /p drive2= What is the SECOND video drive letter (example: d:):
...etc..