Solved

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

Posted on 2011-02-21
4
1,166 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
  • 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
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 34944725
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now