Robocopy is the best reliable and feature rich way to batch copy files on Windows. However, it is a command line tool.
I am looking for a library/API that I could do the same in my program. I tried to use Process.Start(), but then I have to capture and to parse stdout for progress bar and no way to the overwrite behavior.
For example, exclude file base on delegate function; rename file if it is older; (re)start copy based on some events.
I guess copy, xcopy, recursive copy and etc, should be the most frequency wheel programmers do reinvent. Are there any API/library I missed?
I realize that this is a very old post, but just in case someone stumbles upon it...
I wrote a wrapper for robocopy in c# called RoboSharp. It does exactly what the OP originally requested.
https://github.com/tjscience/RoboSharp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With