%~z1


%~z1 – expands %1 to size of file

To get the size of a file in bytes using batch script is very easy.

Open note pad and type in the below commands.

echo %~z1

pause

save the file as test.bat

If you want to get the size of a file ,say “Testmysize.mdb” ,Open cmd.exe and run the below command.

test.bat Testmysize.mdb

It will display the size of Test my size.mdb file in bytes.

Advertisements

0 Responses to “%~z1”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: