The File Size Program

With this miniprogram you can get the size of a file or a directory. You need a commandbutton to get the program going.

The Code

PUBLIC SUB Button1_Click()
Dialog.OpenFile()
WITH Stat(Dialog.Path)
PRINT .Size; " K"
END WITH
END

If you want to put the size in a textarea, then you have to choose the following variation:

PUBLIC SUB Button1_Click()
DIM mysize AS string
Dialog.OpenFile()
WITH Stat(Dialog.Path)
PRINT .Size; " K"
END WITH
TextArea1.Text = mysize & " K"
END

-- ReinerHoffmann - 09 Sep 2004