Topaz Filer - Email filing software
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...
 
Double-click to open VS solution with elevated permissions on Windows 7
New BootFX DBGet build available
 
    
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...
 
Twitter and Snow… simple #uksnow
Windows 7 compatible tool for mounting ISO images
 
    
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




Topaz Filer - Email filing software
Ad
BootFX
Reliable and powerful .NET application framework.
Looking to invest in a major software project? Technical and commercial advice available here.
Other Helpful Sites
MBR 247
Topaz Filer
SharePoint Email Filing
Software Advisory Services
 
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