Skip to content

Instantly share code, notes, and snippets.

@glucero
Last active December 11, 2015 17:48
Show Gist options
  • Save glucero/4636623 to your computer and use it in GitHub Desktop.
Save glucero/4636623 to your computer and use it in GitHub Desktop.
@ECHO OFF
SET SIZELIMIT=%2
SET FILESIZE=%~z1
SET FILEPATH=%~f1
SET DKEY="OS|Windows|FileSize|%~nx1"
IF %FILESIZE% GTR %SIZELIMIT% (
ECHO %DKEY% %FILESIZE% 2 "%FILEPATH% is greater than %SIZELIMIT%"
) ELSE (
ECHO %DKEY% %FILESIZE% 0 "%FILEPATH% is smaller than %SIZELIMIT%"
)
GOTO :EOF
@glucero
Copy link
Author

glucero commented Jan 25, 2013

[checker] [path to file] [max bytes]

(file_size_check.bat c:\file.txt 1000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment