Rob Nicholson
Rob Nicholson

Reputation: 1982

Looking to emulate the functionality of robocopy in a .NET application

Robocopy is a great command line tool for mirroring two folders. We have a requirement to wrap up the same functionality in a bigger .NET application. It's part of our archiving system for the file server which identifies which folders haven't been modified for a year and moves them to another folder location.

I know I could shell out to robocopy but it would be neater if we could do it all from within the .NET app, e.g. for error trapping.

The .NET framework has all the basics for this but I wondered if anyone knew of a 3rd party library that offered more powerful synchronisation functions? To save us re-inventing the wheel. It also needs to be robust so chances are a more well established library would fair better that our own 1st version attempt.

Thanks, Rob.

Upvotes: 2

Views: 1854

Answers (2)

xcopy
xcopy

Reputation: 2288

This question is a bit old but I thought I would answer to help anyone who still land on it. I wrote a library called RoboSharp (http://robosharp.codeplex.com) that brings all of the goodness that is in Robocopy to c#. Take a look if you require the power of Robocopy in c#.

Upvotes: 2

Tim Robinson
Tim Robinson

Reputation: 54764

Robocopy is somewhat similar to rsync. It looks like there's been a couple of attempts to either call librsync from C#, or build a C# replacement:

This looks promising (there's recent activity), but I couldn't vouch for it:

Upvotes: 0

Related Questions