Code: Select all
for %%i in (A:,B:,D:,E:,F:,G:,H:,I:,J:,K:,L:,M:,N:,O:,P:,Q:,R:,S:,T:,U:,V:,W:,X:,Y:,Z:,) do (if exist %%i\autounattend.xml set usb=%%i & echo the usb drive is %usb%)
Code: Select all
for %%i in (A:,B:,D:,E:,F:,G:,H:,I:,J:,K:,L:,M:,N:,O:,P:,Q:,R:,S:,T:,U:,V:,W:,X:,Y:,Z:,) do (if exist %%i\autounattend.xml set usb=%%i & echo the usb drive is %usb%)