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?
Thanks for your answers, and after some more research, I believe the API does not exist.
The maximum degree of reusing the feature from Robocopy is fork a child process with command line arguments.