1

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.

3

1 Answer 1

2
@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%
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.