A file sync app that handles deletions???

Any other tech-related topics
Post Reply
Message
Author
Turpin
Posts: 2
Joined: Thu Aug 28, 2008 11:19 pm

A file sync app that handles deletions???

#1 Post by Turpin »

I'm going crazy because I have what I think is a fairly straight-forward even simple need that doesn't seem to have been met by any free software. Does anyone know of any folder sync software or a way to create a batch file that synchronizes all changes to folders bi-directionally? Let me emphasize ALL CHANGES. Including deletions? Without pop-ups or user intervention? I can tell you how such as system should work, but I lack the skill (yet) to make an app to do it. It would go something like this:
A filelist.txt log is kept from synchronization to synchronization which allows the synchronizer a way to tell whether a missing file on one side means that it is a new file on the other side or a deleted file on this side.
1. Any file in either side not in the file list, copy to other side.
2. Any file missing on either side, auto-delete from other side, or, to be safe, move it to a designated "sync trash" folder.
3. Now that both sides are equal, update the file list log.
Such a system could be run maybe once every 10 minutes on a schedule to keep two computers in sync whenever they can see each other over the network. Of course, if one of the two folders isn't present, the script would end. Has anyone here done such a thing? Or know how it could be done? I'm familiar somewhat with simple batch scripts, and I make much use of third party command line tools to accomplish things, but this has eluded me and I've spent hundreds of hours looking for a solution.

ashghost
Posts: 384
Joined: Wed Feb 06, 2008 2:55 pm
Location: South Carolina

Allway Sync

#2 Post by ashghost »

Allway Sync uses a database to make comparisons, so that all changes are detected and can be propagated to either side of a synchronization. The penalty for this (in my very limited experience) is speed, but I didn't give it much of a shot - I was mostly too lazy to switch to it, but I also decided that I'd rather risk unnecessary leftovers than risk unintended deletions. :)

It's still officially rejected for writing to the registry, but the newer portable version fixed that, so it's now not included because it requires IE 5.5 or later and perhaps some early bugs. Discussions of its portability are in these threads:

http://www.portablefreeware.com/forums/ ... php?t=1646

http://www.portablefreeware.com/forums/ ... php?t=2022

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#3 Post by m^(2) »

Code: Select all

cd src_dir
dir /b /c>"%tmp%\_tmp_src_aoiaj5nfa"
cd tgt_dir
dir /b /c>"%tmp%\_tmp_tgt_aoiaj5nfa"

:: Compare dirs
for /f %%a IN "%tmp%\_tmp_src_aoiaj5nfa" do call CheckSrc "%%a"
for /f %%a IN "%tmp%\_tmp_tgt_aoiaj5nfa" do call CheckTgt "%%a"

:: Cleanup
del _tmp_src_aoiaj5nfa
del _tmp_tgt_aoiaj5nfa
del _tmp_out_aoiaj5nfa
goto :eof

:CheckSrc
find %1 "%tmp%\_tmp_tgt_aoiaj5nfa">"%tmp%\_tmp_out_aoiaj5nfa"
:: TODO: Check output, copy if needed
goto :eof

:CheckTgt
find %1 "%tmp%\_tmp_src_aoiaj5nfa">"%tmp%\_tmp_out_aoiaj5nfa"
:: TODO: Check output, delete if needed
goto :eof

Redbeard
Posts: 1
Joined: Fri Sep 19, 2008 10:13 pm

#4 Post by Redbeard »

Try DSynchronize. I think it will do what you need.

Code: Select all

http://dimio.altervista.org/eng

Turpin
Posts: 2
Joined: Thu Aug 28, 2008 11:19 pm

#5 Post by Turpin »

Thanks all! Also, like usual, I found a solution shortly after I asked the question: Unison, but I still needed to find out if that could be made to run in the background automatically. I'm certainly glad I asked though. m^(2)'s script looks perfect (thanks for taking time out to help; Portable Virtualbox is awesome)!. As for Dsynchronize, I love it and have used it a lot, but from what I've seen, it only handles deletes one-way, which doesn't quite do it. Allway's free version limits you to so many files per month if I remember right. I'm sure I can make something work now. Thanks for these quick responses and the help.

Michael84
Posts: 1
Joined: Wed Mar 18, 2009 1:05 pm

Re: Allway Sync

#6 Post by Michael84 »

ashghost wrote:Allway Sync uses a database to make comparisons, so that all changes are detected and can be propagated to either side of a synchronization. The penalty for this (in my very limited experience) is speed, but I didn't give it much of a shot - I was mostly too lazy to switch to it, but I also decided that I'd rather risk unnecessary leftovers than risk unintended deletions. :)

It's still officially rejected for writing to the registry, but the newer portable version fixed that, so it's now not included because it requires IE 5.5 or later and perhaps some early bugs. Discussions of its portability are in these threads:
Additional utility for this matter is this file sync program. User-friendly interface, speed and efficiency.

Rose82
Posts: 1
Joined: Fri Jun 12, 2009 10:02 am

file synchronization

#7 Post by Rose82 »

I use a programme to file synchronization, which is called File Sync. Auto file and folder sync software is a necessary thing for everybody. That is why I use this program and haven't such problems.

jesica
Posts: 1
Joined: Sun Jun 14, 2009 11:53 pm

#8 Post by jesica »

Any file in either side not in the file list, copy to other side.
sonnerie portable gratuite

Post Reply