summaryrefslogtreecommitdiff
path: root/BUILD/Help/html/Macros.html
blob: c93b2373aefa6fbd32876e8c665b9e08a50430c4 (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
<!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="LibreOffice 4.0.2.2 (Windows)">
	<META NAME="CREATED" CONTENT="20091206;16574000">
	<META NAME="CHANGED" CONTENT="20130418;21351827">
	<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 }
		H2 { margin-bottom: 0.21cm }
		H2.western { font-family: "Times New Roman", serif }
		H2.cjk { font-family: "SimSun" }
		H2.ctl { font-family: "Mangal" }
	-->
	</STYLE>
</HEAD>
<BODY LANG="de-DE" DIR="LTR">
<H2 CLASS="western"><FONT FACE="Tahoma, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt">Macros</FONT></FONT></H2>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">All
directory names may contain macros that are expanded during
synchronization. Begin and end of each macro is marked by a </FONT><FONT FACE="Tahoma, sans-serif"><B>%</B></FONT>
<FONT FACE="Tahoma, sans-serif">character. Besides special macros
handling time and date, the </FONT><SPAN STYLE="text-decoration: none"><FONT FACE="Tahoma, sans-serif"><B>operating
system's environment variables</B></FONT></SPAN> <FONT FACE="Tahoma, sans-serif">can
also be used.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Internal
macros:</B></FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen2" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
	<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%date%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">2012-12-22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>format
	[YYYY-MM-DD] <BR><FONT FACE="Courier New, monospace">%time%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">123044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>format
	[hhmmss] <BR><FONT FACE="Courier New, monospace">%timestamp%&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">2012-12-22
	123044&nbsp;</FONT>format [YYYY-MM-DD hhmmss] <BR><BR><FONT FACE="Courier New, monospace">%year%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">2012</FONT><BR><FONT FACE="Courier New, monospace">%month%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">12</FONT><BR><FONT FACE="Courier New, monospace">%day%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">22</FONT><BR><BR><FONT FACE="Courier New, monospace">%hour%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">12</FONT><BR><FONT FACE="Courier New, monospace">%min%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">30</FONT><BR><FONT FACE="Courier New, monospace">%sec%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">44</FONT><BR><BR><FONT FACE="Courier New, monospace">%weekday%&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">Monday&nbsp;</FONT>day
	of the week <BR><FONT FACE="Courier New, monospace">%week%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</FONT>e. g. <FONT FACE="Courier New, monospace">28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>calendar
	week</FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Environment
variables: </B><SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen4" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
	<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%AllUsersProfile%&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\ProgramData<BR>%AppData%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming<BR>%ComputerName%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">Zenju-PC<BR>%LocalAppData%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Local<BR>%ProgramData%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\ProgramData<BR>%ProgramFiles%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Program
	Files<BR>%ProgramFiles(x86)%&nbsp;</FONT>e. g. <FONT FACE="Courier New, monospace">C:\Program
	Files (x86)<BR>%Public%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\Public<BR>%Temp%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Windows\Temp<BR>%UserName%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">Zenju<BR>%UserProfile%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;<BR>%WinDir%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Windows</FONT></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>Special
folder locations </B><SPAN STYLE="font-weight: normal">(Windows)</SPAN></FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen6" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
	<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">%csidl_Desktop%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Desktop<BR>%csidl_Downloads%&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Downloads<BR>%csidl_Favorites%&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Favorites<BR>%csidl_MyDocuments%&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Documents<BR>%csidl_MyMusic%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Music<BR>%csidl_MyPictures%&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Pictures<BR>%csidl_MyVideos%&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\Videos<BR>%csidl_Nethood%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Network
	Shortcuts<BR>%csidl_Programs%&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e. g.
	<FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Start
	Menu\Programs<BR>%csidl_Quicklaunch%&nbsp;</FONT>e. g.
	<FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Internet
	Explorer\Quick Launch<BR>%csidl_Resources%&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Windows\Resources<BR>%csidl_StartMenu%&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Start
	Menu<BR>%csidl_Startup%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>e. g.
	<FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Start
	Menu\Programs\StartUp<BR>%csidl_Templates%&nbsp;&nbsp;&nbsp;</FONT>e.
	g. <FONT FACE="Courier New, monospace">C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Templates</FONT></FONT></P>
</SPAN><BR CLEAR=LEFT><FONT FACE="Tahoma, sans-serif">Note: Most
macros listed here also have a variant for public folders.</FONT>
E.g. <FONT FACE="Courier New, monospace">csidl_MyMusic</FONT> &rarr;
<FONT FACE="Courier New, monospace">csidl_PublicMusic</FONT> 
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>

<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Hint:</B></FONT></P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">You can
add a great amount of flexibility to batch synchronization
(*.ffs_batch) by creating new temporary environment variables in a
*.bat/*.cmd file that are evaluated by FreeFileSync at runtime!</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><B>Example:</B>
The FreeFileSync batch file <FONT FACE="Courier New, monospace">C:\SyncJob.ffs_batch
</FONT>contains macro <FONT FACE="Courier New, monospace">%MyVar%
</FONT>instead of an absolute target folder and is invoked by a *.cmd
file:</FONT></P>
<P STYLE="margin-left: 1.32cm; margin-bottom: 0cm"><SPAN ID="Rahmen5" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
	<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif"><FONT FACE="Courier New, monospace">set
	MyVar=C:\Target<BR>&quot;C:\Program
	files\FreeFileSync\FreeFileSync.exe&quot;
	C:\SyncJob.ffs_batch<BR></FONT><FONT COLOR="#808080"><FONT FACE="Courier New, monospace"><I><B>::%MyVar%
	is resolved as C:\Target during synchronization</B></I></FONT></FONT></FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
	<P><SPAN ID="Rahmen3" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; 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><BR>Temporary
		environment variables created with the &quot;<FONT FACE="Courier New, monospace">set</FONT>&quot;
		command are only valid if the batch job is started by calling the
		executable directly! Using &quot;<FONT FACE="Courier New, monospace">start
		/wait</FONT>&quot; or relying on Shell Execute creates a new
		program context without these temporal variables.</FONT></P>
	</SPAN><BR CLEAR=LEFT>
	</P>
</BODY>
</HTML>
bgstack15