summaryrefslogtreecommitdiff
path: root/BUILD/Help/html/RealtimeSync.html
blob: c147a60ec1a35b7ebd10674b7c7e02dd27f5afe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4.1  (Win32)">
	<META NAME="CREATED" CONTENT="20091206;16574000">
	<META NAME="CHANGED" CONTENT="20130206;20451343">
	<META NAME="Info 1" CONTENT="">
	<META NAME="Info 2" CONTENT="">
	<META NAME="Info 3" CONTENT="">
	<META NAME="Info 4" CONTENT="">
	<STYLE TYPE="text/css">
	<!--
		@page { margin: 2cm }
		P { margin-bottom: 0.21cm }
		H3 { margin-bottom: 0.21cm }
		H3.western { font-family: "Arial", sans-serif }
		H3.cjk { font-family: "MS Mincho" }
		H3.ctl { font-family: "Mangal" }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H3 CLASS="western" ALIGN=CENTER><IMG SRC="../img/RTS_logo.png" NAME="Grafik6" ALIGN=ABSMIDDLE WIDTH=269 HEIGHT=59 BORDER=0><FONT SIZE=4 STYLE="font-size: 16pt"><BR></FONT><FONT SIZE=3><I><SPAN STYLE="font-weight: normal">Automated
Synchronization</SPAN></I></FONT></H3>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">RealtimeSync
is a small tool which executes a command line each time it detects
changes in one of the monitored directories </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>or</B></SPAN></FONT>
<FONT FACE="Tahoma, sans-serif">a directory becomes available (e. g.
insert of a USB-stick). Usually this command line will simply trigger
a FreeFileSync batch job.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT>
<FONT FACE="Tahoma, sans-serif">Real time synchronization - in
combination with FreeFileSync</FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Start
RealtimeSync.exe located in FreeFileSync's installation directory.
Then specify all folders that shall be monitored. Instead of doing
this manually you can import a </FONT><FONT FACE="Courier New, monospace">*.ffs_batch</FONT>
<FONT FACE="Tahoma, sans-serif">file via </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Menu
&rarr; Program &rarr; Open</B></SPAN></FONT><FONT FACE="Tahoma, sans-serif">.
This not only extracts all directories relevant for synchronization
but also sets up the command line to execute the </FONT><FONT FACE="Courier New, monospace">*.ffs_batch</FONT>
<FONT FACE="Tahoma, sans-serif">file each time changes are detected.
Now press </FONT><FONT FACE="Tahoma, sans-serif"><SPAN STYLE="font-style: normal"><B>Start</B></SPAN></FONT>
<FONT FACE="Tahoma, sans-serif">to begin monitoring.</FONT></P>
<UL>
	<P STYLE="margin-bottom: 0cm"><IMG SRC="../img/RealtimeSync.png" NAME="Grafik3" ALIGN=MIDDLE WIDTH=461 HEIGHT=388 BORDER=0></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%;  border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note</B></FONT></P>
		<LI><P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The
		command should </FONT><FONT FACE="Tahoma, sans-serif"><B>not</B></FONT>
		<FONT FACE="Tahoma, sans-serif"><B>block</B></FONT> <FONT FACE="Tahoma, sans-serif">progress.
		Make sure the FreeFileSync batch job does not show any popup
		dialogs. See notes in <A HREF="Batch%20Scripting.html">Batch
		Scripting</A>.</FONT><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif"><BR>&nbsp;</FONT></SPAN></P>
		<LI><P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The
		settings dialog can be skipped by passing a RealtimeSync
		configuration file (<FONT FACE="Courier New, monospace">*.ffs_real</FONT>)
		<B>or</B> a FreeFileSync batch file (<FONT FACE="Courier New, monospace">*.ffs_batch</FONT>)
		as first command line argument to RealtimeSync.exe. This can be
		integrated into the operating system's auto start
		facility:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE="Courier New, monospace">&quot;C:\Program
		Files\FreeFileSync\RealtimeSync.exe&quot;
		&quot;C:\SyncJob.ffs_real&quot;<BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE="Courier New, monospace">&quot;C:\Program
		Files\FreeFileSync\RealtimeSync.exe&quot; &quot;C:\SyncJob.ffs_batch&quot;</FONT><BR>&nbsp;</FONT></P>
		<LI><P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Using
		RealtimeSync is not restricted to starting FreeFileSync. It can
		also be used in other scenarios, like sending an email whenever a
		certain directory is modified.</FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT>
<FONT FACE="Tahoma, sans-serif">Automatic synchronization when USB
stick is inserted</FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Save a
ffs_batch configuration into the USB stick's root directory and have
it called when the stick is mounted. Then configure RealtimeSync as
shown in the following:</FONT></P>
<UL>
	<P><IMG SRC="../img/WatchUsbInsert.png" NAME="Grafik2" ALIGN=BOTTOM WIDTH=437 HEIGHT=362 BORDER=0></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Whenever
directory &quot;</FONT><FONT FACE="Courier New, monospace">H:\Data</FONT><FONT FACE="Tahoma, sans-serif">&quot;
becomes available, the command line executes and starts the batch job
on the stick. Additionally it also starts the batch job each time
files are modified in &quot;</FONT><FONT FACE="Courier New, monospace">H:\Data</FONT><FONT FACE="Tahoma, sans-serif">&quot;.
</FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%;  border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note<BR></B></FONT><FONT FACE="Tahoma, sans-serif">The
		full path of the last changed file and the action that triggered
		the change notification (create, update or delete) are </FONT><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif">written
		to the environment variables </FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace"><B>%change_path%</B></FONT></SPAN><SPAN STYLE="text-decoration: none">
		</SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif">and
		</FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace"><B>%change_action%</B></FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Courier New, monospace">.</FONT></SPAN></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B></FONT>
<FONT FACE="Tahoma, sans-serif">Show names of changed files or
directories. (Windows)</FONT></P>

	<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen4" DIR="LTR" STYLE="float: left; width: 80%;  border: none; padding: 0cm; background: #e6e6e6">
			<P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><FONT FACE="Tahoma, sans-serif">Show
			which file or directory has triggered a change. Enter command
			line:</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;cmd /c echo
			%change_action% &quot;%change_path%&quot; &amp; pause<BR><BR><FONT FACE="Tahoma, sans-serif">Write
			a list of all changes to a logfile:</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;cmd
			/c echo %change_action% &quot;%change_path%&quot; &gt;&gt;
			c:\log.txt</FONT></P>
	</SPAN><BR CLEAR=LEFT>
	</P>
	
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen5" DIR="LTR" STYLE="float: left; width: 80%;  border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Note<BR></B></FONT><FONT FACE="Tahoma, sans-serif">During
		execution of a Windows Batch file (*.bat/*.cmd) a black console
		window is shown. You can hide it using the Visual Basic script
		&quot;HideConsole.vbs&quot; located in FreeFileSync's installation
		directory:</FONT></P>
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm;  margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><B>wscript
		&quot;C:\Program files\FreeFileSync\HideConsole.vbs&quot;
		C:\MyBatchFile.cmd</B></FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Tahoma, sans-serif"><B>Limitations</B>:</FONT></P>
<UL>
	<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If
	multiple changes happen at the same time, only the name of the first
	file is written to variable &quot;changed_file&quot;.</FONT></P>
	<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">While
	RealtimeSync is executing the command line, monitoring is inactive
	and changes occurring during this time are lost. </FONT>
	</P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
</BODY>
</HTML>
bgstack15