Solved

Best way to synchronize 2 folders

Posted on 2006-11-01
3
203 Views
Last Modified: 2010-04-23
Hi experts

i have to make a program that synchronize 2 folders
but i'm asking if there is a smart way to do this because the only way i know if to loop throught all files in one folder and check if exist in the other
but when the program crash in the middle thread, i have to loop from the beginning, that's not very handy...

so i'm sure there is a way to make this smartly...

please let me know how you will do this if you have to sync 2 folders smartly

any suggestion are welcome...

regards

0
Comment
Question by:Dnx_7
3 Comments
 
LVL 10

Assisted Solution

by:ericwong27
ericwong27 earned 50 total points
ID: 17849216
Hi,

If the coding is not the "must-do" then try to use SyncToy v1.4 (Freeware from Microsoft)

http://www.microsoft.com/downloads/details.aspx?familyid=E0FC1154-C975-4814-9649-CCE41AF06EB7&displaylang=en
0
 
LVL 5

Accepted Solution

by:
DEEPESH earned 450 total points
ID: 17849363
I don't know what you have code but if i have to do it i would do it in this manner
You can use FileSystemWatcher and whenever changes take palce in the folder, start copying,
Second check each file through io.File.Exists on destination path, if not then use io.file.copy

Visit the links it may help
http://vbnet.mvps.org/index.html?code/fileapi/copyfile.htm
http://dotnetjunkies.com/Forums/ShowPost.aspx?PostID=1547

I think what you are doing is correct
0
 
LVL 2

Author Comment

by:Dnx_7
ID: 17859340
thank you guys...
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question