@echo off for /f "skip=1" %%a in ('wmic logicaldisk where "drivetype=5" get DeviceID') do echo %%a pause