Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要这个命令的输出值:
wmic logicaldisk where "DeviceID='C:'" get FreeSpace
分配给我可以在 IF 条件下使用的变量。
@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%