CODE: [Copy to clipboard]@echo off for /f %%a in ('"wmic logicaldisk where DriveType="3" get DeviceID|find /v "DeviceID""') do echo %%a