How to check if user entered the right drive


Hi Experts,

I have asked the question previously in
http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_21772126.html

However, I am looking for something simple to check if the drive is there and writable.  What I need to do is to copy few files to a user supplied floppy or USB or any mapped drives.  I need to check quickly if the drive is valid before trying to copy the files.

What is the better way to do this.
LVL 1
thaneshAsked:
Who is Participating?
 
jkrCommented:
The easiest way would be to call 'GetDiskFreeSpace()' - if that reports 'no space', the drive is probably readonly. If the function failes, the drive isn't there.
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.