Hi. I was just wondering if there is a simple way to get the file size of a selected program. The thing is that if i select a word document or etc the file size should be 2.34MB not like 2355.2 in KB or B. If the file size is 1 GB it whould show the file size like how it does in the explorer.

Thanks

Recommended Answers

Use the Length property of the FileInfo class. Click Here Convert this long number to your liking.

Jump to Post

All 3 Replies

Use the Length property of the FileInfo class. Click Here Convert this long number to your liking.

Thanks! I'll let you know once I got it :D

Use the Length property of the FileInfo class. Click Here Convert this long number to your liking.

Yeap! Works! Thanks alot!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.