Solved

Copying a file to usb-based storage media from VB.Net 2008

Posted on 2011-02-21
4
1,189 Views
Last Modified: 2012-05-11
My application is a VB.Net application in .net 3.5. I have given a feature for backing up sql database. This creates a .bak file. Now I want to give facility to my user to copy this .bak file on pen/flash drive or USB-based hard-disk. For this:
1. How can I scan the system hardware to find if any USB-based removable storage media is connected?
2. Once that is found, I want to display these drive list from (1) above  in the listbox. Then the user will select the drive.
3. How to check if the selected usb-storage has sufficient space?
4. How to copy my .bak file on this usb-storage?

Regards,
MI
0
Comment
Question by:vj_mi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
imaki06 earned 500 total points
ID: 34942200
There is an example here.

However it does not see whether that is really an USB-drive. But only if the drivetype is removable..
0
 

Author Comment

by:vj_mi
ID: 34942225
But in that case, even Cd/DVD is considered removable. But copy function will not work in that case.

Regards,
MI
0
 
LVL 3

Expert Comment

by:imaki06
ID: 34942249
There is another function SetupDiGetDeviceRegistryProperty which could be used to get more info on those volumes.

But I do not know how to use it. I just found one example. The example can be found from comments (almost last one).
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question