Solved

Best way to synchronize 2 folders

Posted on 2006-11-01
3
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

724 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