i automated way of running disk cleanup when fsutil volume diskfree c: returns under, lets say, 50gb. currently, have used cleanmgr /sageset:1 , stored settings, process half automated. when returns amount of space free, there way windows read this. keep in mind in batch file, cannot manually view this. help!
@echo off setlocal set "pad=000000000000000" set "neededspace=%pad%4294967296" /f "delims== tokens=2" %%x in ( 'wmic logicaldisk "deviceid='c:'" freespace /format:value' ) %%y in (%%x) set "freespace=%pad%%%y" if "%freespace:~-15%" geq "%neededspace:~-15%" echo drive has @ least 4 gb free space.
Comments
Post a Comment