Multimobile Development: Building Applications for any Smartphone
Synchronising files
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.


JezB
I want to synchronise files between directories as part of my .NET
application. Ideally I'd like to invoke an XCOPY-like operation which copies
only new and changed files from source to target. Is anything like this
available as part of the framework ? If not how do I invoke a windows
command from within a .NET application and capture the output ?

Reply to this message...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
Sijin Joseph
You can use the FileSystemWatcher .Net framework component to monitor a
folder for changes and then use the classes in System.IO to sync the two
folders

--
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

"JezB" <Click here to reveal e-mail address> wrote in message
news:%237$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
First volume of Multimobile Development nearly ready to go to press
A mention on Developing for the iPhone and Android: The pros and cons
 
    
Morten Wennevik
On Wed, 4 Aug 2004 11:12:50 +0100, JezB <Click here to reveal e-mail address> wrote:

[Original message clipped]

I would recommend a windows service to monitor changes in the directory and for
instance File.Copy to copy the files.

If you want to fire xcopy from within your program you can use the Process and
ProcessStartInfo (and perhaps ProcessInfo) classes. They will also let you
specify your own input, output, and error output.

--
Happy coding!
Morten Wennevik [C# MVP]
Reply to this message...
Vote that this is a GOOD answer...
 
 
 
System.Diagnostics.ProcessStartInfo
System.IO.File
System.IO.FileSystemWatcher
System.Web.ProcessInfo




Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734