I'm sure that Robocopy simply uses CopyFileEx underneath. I'd guess the code is basically:
while(!CopyFileEx(src, dest, RESTARTABLE) && !CancelCopy()) { sleep(30000); } Why that's so hard to port to the Explorer codebase is a mystery I'll never understand....Thankfully, there's TeraCopy http://www.codesector.com/teracopy.asp that does Microsoft's job for them! --MB > -----Original Message----- > From: Discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED] On Behalf Of Shawn Wildermuth > Sent: Tuesday, December 18, 2007 3:22 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Robust file copy > > +1 for Robocopy...I sync my mp3 collection (all legal, honest ;) to my > MCE > every day or two and my wireless connection is really lousy, the > retry/continue stuff in Robocopy is a lifesaver. > > Thanks, > > Shawn Wildermuth > http://adoguy.com > http://wildermuthconsulting.com > Microsoft MVP (C#), MCSD.NET, Author and Speaker > > The Silverlight Tour is coming to a city near you! > > -----Original Message----- > From: Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Geoff Taylor > Sent: Tuesday, December 18, 2007 1:46 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Robust file copy > > Hi, > > Before getting as complicated as using BITS, what about Robocopy: > > "Robocopy, or "Robust File Copy", is a command-line folder replication > tool. > It was available as part of the Windows Resource Kit, and introduced as > a > standard feature of Windows Vista." > http://en.wikipedia.org/wiki/Robocopy > > Or Hobo Copy: > > "HoboCopy is a backup/copy tool. It is inspired by robocopy in both > name and > in functionality. It differs greatly from robocopy, however, in two > respects: > > 1. It is not as full-featured as robocopy. > 2. It uses the Volume Shadow Service (VSS) to "snapshot" the disk > before > copying. It then copies from the snapshot rather than the "live" disk. > " > > http://www.pluralsight.com/wiki/default.aspx/Craig/HoboCopy.html > > Using a command-line program is not particularly .NET-like, but it may > be > appropriate in your situation. (Alternatively, your situation may rule > it > out completely, in which case, erm, sorry!) > > Good luck, > > Geoff > > > -----Original Message----- > > From: Discussion of advanced .NET topics. [mailto:ADVANCED- > > [EMAIL PROTECTED] On Behalf Of Mont Rothstein > > Sent: 18 December 2007 18:21 > > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > > Subject: [ADVANCED-DOTNET] Robust file copy > > > > I am looking for a robust way to copy files across a network that has > > high > > latency and may be unreliable. > > > > Currently I use a FileStream instead of File.Copy because the source > > account > > does not have permissions on the destination drive and vis-a-versa (I > > impersonate accounts over the network). > > > > What I'm looking for is some way (either something in .NET or a 3rd > > part > > component) to perform file copies from code that will gracefully > handle > > connections that go up and down, continue when possible, and > generally > > reliably deliver in the face of less than ideal network connections. > > > > Now obviously I can wrap my current code in handlers and do this > myself > > but > > if the problem has already been solved I'd rather not re-invent the > > wheel. > > I've been Goggling but I can't find what I am looking for. > > > > Any suggestions? > > > > Thanks, > > -Mont > > > > =================================== > > This list is hosted by DevelopMentorR http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor. http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com