That file size is in bytes.  There are 1024 bytes in a
kilobyte, correct? There are 1024 kilobytes in a
megabyte, correct?  So from that knowledge, you
would do:

ROUND(objFile.size / (1024 * 1024), 1)

to receive your variable, in previously requested format.

Hope that helps,

Chris Tifer
http://www.emailajoke.com



----- Original Message -----
From: "jake williamson" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 1:08 PM
Subject: showing file size in meg


hello!

got this real cool file system thing building at the moment for our
clients to log in and download pdf proofs.

it's a real small cosmetic thing but i'd like to show the size in
'finder' style. at the moment my code:

<% = objFile.Size %>

gives me:

1489493

if i do:

<% = objFile.Size / 1000 %>

to divide it into k i get:

1489.493

when what i really want is:

1.489

or preferably:

1.4

is this gonna be a complete pain or is it dead easy??

thanks out here lads and lass',

jake

---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to