Click here to Skip to main content
15,921,169 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am creating one utility.which is copying file from one share location to another share location.
I have shared file path. So just wanted to know which one is faster like creating FileInfo object and then use copyto method or create webclient object then use DownloadFile method.

I have to copy milinon of files.So please suggest which one is faster. Other than that any option their in c# please let me know
Posted

You could use wget to download it.
Its alot faster than webclient.
start tha command by using
c:\wget.exe -r http://www.youtube.com
hop it can help you.
you can download it from this site :)
http://www.gnu.org/software/wget/
 
Share this answer
 
I guess that will depend on your network. If your shared location is connected through network which has high speed data transfer (for ex - LAN has 10mbps data transfer speed), that would be faster otherwise WebClient method would be faster considering you have a high speed internet connection.

Why don't you just try it for one file? It would just be few lines of code.
 
Share this answer
 
Comments
londhess 16-Jan-14 23:35pm    
Thanks Ankur...Its based on network.

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