Disk full error?

When I copy a file I want to get a messagebox if the disk is full ... how do I do that? Borland C++ 5.02 (winodws)

Who is Participating?
cpopinConnect With a Mentor Commented:
Check out the SHFileOperation() function and its related structure SHFILEOPSTRUCT.
bert1Author Commented:
Hmm I don't can't see that it has a disk full error?

GetLastError and FormatMessage is maybe a way ?

Or GlobalMemoryStatus and MEMORYSTATUS ?

I don't know what's the best way... should I do a check of the size of the file before copying and then compare that to how much space are available??
It should act exactly like Explorer would when confronted with a disk full error, display a message box.
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.