Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disk space problems
Message
 
To
15/01/1999 10:40:46
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00176492
Message ID:
00176528
Views:
25
Hi Dave,

>Has anyone encountered FPD2.6 not recognizing disk space on a FAT-32 system with greater than 5 gig drives?

Yes. DOS was only able to determine 2 GB of free disk space. If you enter DIR on such a drive you commonly got 1,999,999,999 bytes free. FoxPro can handle up to 4 GB, but will return more than 2 GB as a negative value. For more than 4 GG, it starts again, that means 5 GB are reported as 1 GB. The following routine works up to 4 GB of free disk space:
*==================================================
* Returns the available diskspace
*==================================================
Parameter tcDrive

	*-----------------------------------------------
	* evaluate parameter
	*-----------------------------------------------
	Private lcDrive
	If Parameter() == 1
		lcDrive = tcDrive
	Else
		lcDrive = Sys(5)
	Endif
	
	*-----------------------------------------------
	* Get free disk space
	*-----------------------------------------------
	Private lcDefault, lnSize
	lcDefault = Sys(5) + Sys(2003)
	Set Default to &lcDrive
	lnSize = Diskspace()
	If lnSize < 0
		lnSize = lnSize + 2^32
	Endif
	Set Default to &lcDefault

Return lnSize
Christof
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform