Cynosure.X International LLC

:

Add Comment | Related Links | TrackBack
Related Content

Synchronize.bat (GPL)

Synchronize.bat helps you synchronize two directories on local and/or remote machines. It uses rsync to synchronize the first path specified to the second path specified. then it synchronizes the files in the other direction. The command-line path arguments uses the same syntax as rsync.

Synchronize.bat takes advantage of the SetNumberOfArguments.bat (GPL) script that is available on this web site. So to use Synchronize.bat, you'll have to download SetNumberOfArguments.bat, if you don't already have it.

You'll also need to install rsync on your Windows computer, if you don't already have it installed. I personally like the free cwRsync (see "Related Links" below). But this script will probably work with most rsync implementations.

Synchronize.bat is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Usage

  Synchronize.bat "path 1" "path 2"
Where path is a local/network file/directory.

Attached File: Synchronize.bat (450 B)

Chieh Cheng
Thu, 12 Jun 2008 09:21:47 +0000

I've just made a slight improvement to Synchronize.bat. Now you can pass in paths that are surrounded by quotes. In addition, I also made Synchronize.bat more verbose, so that you can see what it is doing. The newer version of Synchronized.bat is attached below.

Attached File: 1 - Synchronize.bat (606 B)

Chieh Cheng
Tue, 21 Oct 2008 22:57:38 +0000

This new version supports an exclude file. Simply put a "SynchronizeEliminate.txt" file in the same directory as the Synchronize.bat script. You can put file patterns in this exclude file so that files matching these patterns will not be synchronized. Thus, speed up your transfers.

You can then delete them at will those files, if they are no longer needed. Or run an automated delete script (there are several on this site).

Attached File: 3 - Synchronize.bat (1 KB)

Chieh Cheng
Thu, 25 Jun 2009 20:44:15 +0000

The new version of cwRsync seems to constantly change the file permission on the UNIX system, whereas the older version leaves them alone. So whenever you use Synchronize.bat to transfer the files and directories, the permission is reset.

The problem is mainly caused by the "-auvz" argument. After changing the argument to "-ruvz", the permission is no longer reset.

The updated Synchronize.bat is attached below.

Attached File: 4 - Synchronize.bat (1 KB)

Chieh Cheng
Tue, 29 Mar 2011 21:44:16 +0000

I've made two improvements to the Synchronize.bat script:

1) It now sets CYGWIN environment variable to "nodosfilewarning" to eliminate warning messages regarding the use of DOS path.

2) It now checks the error code returned by rsync calls. If any rsync calls returns a non-zero error code, that error code is passed out as %ErrorLevel%. If all rsync calls succeeds, then '0' is returned.

The new version of Synchronize.bat is attached below.

Attached File: 5 - Synchronize.bat (2 KB)

Chieh Cheng
Wed, 15 May 2013 10:46:37 +0400

We found that changing "-auvz" to "-ruvz" is insufficient for the purpose of using this "Synchronize.bat" script. The correct set of flags for Windows system is "-rltuvz". The corrected version is attached below.

Attached File: 6 - Synchronize.bat (2 KB)

Chieh Cheng
Fri, 24 May 2013 23:43:40 +0400

Introduced some typos when adding in the error code functionality. The version attached below fixes the typos.

Attached File: 7 - Synchronize.bat (2 KB)

Chieh Cheng
Tue, 02 Jul 2013 14:37:34 +0400

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Related Links

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 3 + 9?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

36 Users Online

Hacking Digital Cameras
Fun for Photographers


Get Our

Memecoins!



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.