开发者

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 robo开发者_JAVA百科copy 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.


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#.


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:

  • Technical Hurdles for Win32 rsync port
  • Is there any .NET API using rsync?

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

  • https://github.com/MatthewSteeples/rsync.net
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜