Answered by:
Alternative to robocopy for C# .net applications

Question
-
I was looking into internet about file copy tool alternative to Robocopy which has either .net API or can be invoked using command line but to my surprise I found only GUI based tools. :(
My team mate found robocopy failing to copy 500 Mb file in c# application.
Is there any alternative tools available in market which can give competition in feature to Robocopy in windows OS which can be integrated in C# .net app?
Answers
-
Why exactly do you need to use robocopy? What's wrong with File.Copy?
When robocopy failed to copy a 500Mb file did you investigate why? For all I know the copy might have failed for reasons that have nothing to do with robocopy and using an alternative will not necessarily avoid the failure.
- Proposed as answer by Cor Ligthert Monday, April 6, 2015 8:51 AM
- Marked as answer by Caillen Wednesday, April 15, 2015 8:55 AM
-
You can directly using C# to do that.
How to: Copy, Delete, and Move Files and Folders (C# Programming Guide).
https://msdn.microsoft.com/en-us/library/vstudio/cc148994(v=vs.100).aspx
chanmm
- Marked as answer by Caillen Wednesday, April 15, 2015 8:55 AM
All replies
-
Why exactly do you need to use robocopy? What's wrong with File.Copy?
When robocopy failed to copy a 500Mb file did you investigate why? For all I know the copy might have failed for reasons that have nothing to do with robocopy and using an alternative will not necessarily avoid the failure.
- Proposed as answer by Cor Ligthert Monday, April 6, 2015 8:51 AM
- Marked as answer by Caillen Wednesday, April 15, 2015 8:55 AM
-
I want to compare performance of different tools like Robocopy. My goal is to copy large files in GBs. I doubt about File.Copy would do that with efficient and reliable way as expected.
Kindly let me know some robust tools if you have any idea. It will be very much helpful.
-
"I doubt about File.Copy would do that with efficient and reliable way as expected."
You doubt that but have you verified that? Have you tried to both File.Copy and robocopy and you found that robocopy is faster than File.Copy?
"Kindly let me know some robust tools if you have any idea. It will be very much helpful."
You didn't explain why robocopy failed to copy the file in the first place. How should one know if some other tool will do the job or not?
-
You can directly using C# to do that.
How to: Copy, Delete, and Move Files and Folders (C# Programming Guide).
https://msdn.microsoft.com/en-us/library/vstudio/cc148994(v=vs.100).aspx
chanmm
- Marked as answer by Caillen Wednesday, April 15, 2015 8:55 AM
-
-
-
Robocopy is one of the most-used command-line utilities to copy large volumes of data in Windows. It’s such a popular tool because of how powerful it is. But with all that power comes complexity. In this guide, we will break down all that complexity and provide a complete tutorial on using this useful tool.
-