How to check if user entered the right drive

Hi Experts,

I have asked the question previously in

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.
Who is Participating?
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.
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.