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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top