size of a file with batch-file, XP Pro

  • Thread starter Thread starter Bernd lentes
  • Start date Start date
B

Bernd lentes

Hey NG,

i want to find out the size of a file on the command prompt.
If the size exceeds a certain size (e.g. 1.5 GB), i want to get a message
via net send.

How can i get the size of a file on the command prompt ?
Thank you for any tip.

Bernd
 
Hey NG,

i want to find out the size of a file on the command prompt.
If the size exceeds a certain size (e.g. 1.5 GB), i want to get a message
via net send.

How can i get the size of a file on the command prompt ?
Thank you for any tip.

Bernd
See tip 5725 in the 'Tips & Tricks' at http://www.jsiinc.com

or in your batch:

call :whatsize filename
....
....
goto someplace
:whatsize
set /a size=%~z1
goto :EOF

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top