Reputation: 11
I want the output value of this command :
wmic logicaldisk where "DeviceID='C:'" get FreeSpace
to be assigned to a variable which I can use in an IF condition.
Upvotes: 1
Views: 2910
Reputation: 41287
@echo off
for /f "skip=1" %%a in ('wmic logicaldisk where "DeviceID='C:'" get FreeSpace') do if not defined var set var=%%a
echo %var%
Upvotes: 2