Why is the FOR /f loop in this batch script evaluating a blank line?

I just came over this topic. I’ve been using findstr /v to exclude empty lines:

FOR /f "usebackq skip=1 tokens=1 delims=:" %%a in (`WMIC logicaldisk WHERE "drivetype=3" GET deviceid ^| findstr /v /r "^$"`) do (

Leave a Comment