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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.