Solved

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

Posted on 2011-02-21
4
1,153 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB.NET Server side Javascript 8 51
GridDataView 6 44
Merging PDFs with VB.NET 10 30
Protecting vb6 & .Net code Obfuscation 18 40
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

8 Experts available now in Live!

Get 1:1 Help Now