Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for Freespace on a diskette

Status
Not open for further replies.

KreativeKai

Programmer
Nov 12, 2004
33
US
I'm not sure how to find freespace on a diskette. I've searched MSDN, but only found examples of VB6 and scripting examples.

I'm trying to find a VB.NET solution. Does anyone have any sample code where they look up how much space a file will take and then check how much space is available on the target drive the file is going to be transfered to?

Any help is appreciated.
 
I don't have any code (never had to do this), but you would look at how many bytes you're trying to write, divide by the cluster size that the media uses, rounding up. (floppies are different from hard drives), then look at the remaining number of clusters on the device to see if it will fit.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top