1
Vote

Generally a useful library. A few things:

description

1) For Windows 7 use I had to set the following:

copy.CopyOptions.DirectoryCopyFlags = ""; // prevents unrecognized /COPY:DA parameter

2) I had to recompile a .NET 4 version. Add project to nuget - will all .Net versions supported.

3) A synchronized method would be nice - i.e. StartAndWait() - along with options to control the internal Task and Process to a greater extent and to be able to terminate the process by command or upon a timeout.

4) it would be great if there was a way to pipe the Robocopy output into .NET and on to a logging framework (log4net or whatever), rather than just writing to a custom file.

5) Handle file names with spaces by automatically "Quoting" the filter parameter. Same for directories.

6) Build in configuration options via a customer configuration section in the app.config file - this would allow the application support team to tweak robocopy settings (like retry count, etc) via configuration rather than having the developer having to do it in code. May need to have to provision for multiple sets of configuration.

7) Deal with remote authentication credentials (tricky as it needs unmanaged calls). I had trouble authenticating the remote location using advapi32.dll\LogonUser - it works fine for System.IO file copy commands but doesnt seem to work because the robocopy creates additional threads. In the end I used Mpr.dll\WNetUseConnection but I dont like it - its flakey.

comments