wiki:HowTo/CmdLineSync

Command Line Utilities for Synchronization

(Updated 2016-8; BallroomDJ version 3.1.4)

If ActiveState Tcl is installed use the tclsh command as outlined below. For BallroomDJ version 3.x on a 64-bit Windows machine, use %USERPROFILE%\Desktop\BallroomDJ\tclsh64.exe.

fmclearsyncids.tcl is used during initialization of the synchronization process. It will remove all of the synchronization IDs from the database. Using Check For New in the Update Database function will generate new synchronization IDs.

fmclearupdflags.tcl is used during initialization of the synchronization process. It clears all of the update flags from the database so that no audio files will be copied.

fmcopyto.tcl is the first step in synchronizing a BallroomDJ database between two computers.

Usage:
tclsh fmcopyto.tcl -- [-missing <from-folder>] <to-folder>

Any contents of to-folder will be completely removed. Be extremely careful to make sure to-folder is correct. Because the removal of files is dangerous, to-folder may not be a top-level folder such as V:\Music, but must be at least a second-level folder. e.g. V:\Music\master.

To use the -missing option, first a fmcopyto.tcl must be run on the target computer. The folder used for its output now becomes the from-folder specified here.

fmcopyfrom.tcl is used to update a BallroomDJ database from a folder previously set up with fmcopyto.tcl.

Usage:
tclsh fmcopyfrom.tcl -- [-replace] <from-folder>

If the -replace option is specified, the database on the target computer will be completely replaced with the database in the from-folder.

Initializing Synchronization via the Command Line

On the master computer:

tclsh bdjmkmlist.tcl -- -checknew <music-folder>

Copy the entire music folder to the target computer.

On the master computer:

tclsh fmclearsyncids.tcl 
tclsh bdjmkmlist.tcl -- -checknew <music-folder>
tclsh fmclearupdflags.tcl
tclsh fmcopyto.tcl -- <folder-a>

On the satellite computer:

tclsh fmcopyfrom.tcl -- -replace <folder-a>

Synchronizing Two Computers

On the satellite computer:

tclsh fmcopyto.tcl -- <folder-1>

On the master computer:

tclsh fmcopyfrom.tcl -- <folder-1>
tclsh fmcopyto.tcl -- <folder-master>

On the satellite computer:

tclsh fmcopyfrom.tcl -- <folder-master>

Copying Missing Files to a Target Computer

On the satellite computer:

tclsh fmcopyto.tcl -- <folder-1>

On the master computer:

tclsh fmcopyto.tcl -- -missing <folder-1> <folder-master>

On the satellite computer:

tclsh fmcopyfrom.tcl -- <folder-master>

Synchronizing Multiple Computers

On satellite 1:

tclsh fmcopyto.tcl -- <folder-1>

On satellite 2:

tclsh fmcopyto.tcl -- <folder-2>

On the master:

tclsh fmcopyfrom.tcl -- <folder-1>
tclsh fmcopyfrom.tcl -- <folder-2>
tclsh fmcopyto.tcl -- <folder-master>

On satellite 1:

tclsh fmcopyfrom.tcl -- <folder-master>

On satellite 2:

tclsh fmcopyfrom.tcl -- <folder-master>
Last modified 21 months ago Last modified on 2016-08-05T06:23:49-08:00