Filter Information with cmd/batch script -
i'm using "disk usage" (http://technet.microsoft.com/en-us/sysinternals/bb896651) size of recycle bin.
the problem bunch of information don't need , can't figure out how select part interests me.
the output of du command is:
files: 27
directories: 3
size: 322.675.258 bytes
size on disk: 322.773.120 bytes
i need batch script or gives me size value in text file.
try this, set desired folder before:
@echo off&setlocal enabledelayedexpansion set "folder=%systemdrive%\$recycle.bin" /f "delims=" %%i in ('du "%folder%" 2^>nul') ( set "size=!dsize!" set "dsize=%%i") >recycle.txt echo(%size% output in recycle.txt.
Comments
Post a Comment