return message if drive is full when saving a file

Hi experts
I would like to find if there is enough availible space on a hard drive before saving a file.
Need to use app.path to get drive letter.
Using vb6
Thank you
isnoend2001Asked:
Who is Participating?
 
BrianGEFF719Connect With a Mentor Commented:
Take a look at the following code that displays available space on all drives:
http://www.freevbcode.com/ShowCode.Asp?ID=1358


Then to get your current drive from app.path you could do:

Dim myDrive As String
myDrive = Left(App.Path, InStr(App.Path, "\"))
0
 
isnoend2001Author Commented:
Thanks BrianGEFF719
I get a overflow message with that program. I don't think it works with large drives
0
 
isnoend2001Author Commented:
Hi BrianGEFF719
I am giving you the points because i did not mention it had to work on huge drives
i found the answer here:
http://www.xtremecomp.com/tips/xttip10.htm
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.