Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
copy all files and folder in usb to specified directory in pc..... like a backup...
could anybody help plz.. i want working code in c# windows form application...
Posted

It's a shame that we can't even Google[^] first.

See the MSDN[^].

Method : File.Copy[^].

-KR
 
Share this answer
 
You need to call
- Directory.GetDirectories (recursively),
- Directory.CreateDirectory
- Directory.GetFiles
and then File.Copy for any file found.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900