<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.commander4j.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dgarratt</id>
	<title>Commander4j - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.commander4j.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dgarratt"/>
	<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Special:Contributions/Dgarratt"/>
	<updated>2026-11-07T16:20:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Desktop_icons.png&amp;diff=2012</id>
		<title>File:Desktop icons.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Desktop_icons.png&amp;diff=2012"/>
		<updated>2026-11-06T16:31:56Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:Desktop icons.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Template:Menu_Applications&amp;diff=2011</id>
		<title>Template:Menu Applications</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Template:Menu_Applications&amp;diff=2011"/>
		<updated>2026-11-06T15:58:05Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:980px; margin:0 auto 1.2em auto; padding:1.1em 1.4em; border:1px solid #c8d1e0; border-radius:10px; background:#f4f6fb;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:1.35em; font-weight:bold;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#1e40c8;&amp;quot;&amp;gt;Commander&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#d92d20;&amp;quot;&amp;gt;4j&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; and its companion applications &#039;&#039;&#039;bridge the gap between your ERP system and factory-floor labelling.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Orders and materials come down from the ERP. Operators print GS1 / SSCC pallet and case labels and record what was made. Production and despatch data go back up. Because Commander4j keeps its own database, labelling carries on when the link to head office is down and catches up when it returns.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New here?&#039;&#039;&#039; Start with the [[Install Guide]] and you will be logged in within the hour. Everything is free and open source (GPL v3).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;c4j-fluid&amp;quot; style=&amp;quot;max-width:980px; margin:0 auto;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Commander4j_How_It_Fits.png|980px|center|link=]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Start here=&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;width:100%; max-width:980px; margin:0 auto; text-align:center; border-spacing:12px; table-layout:fixed;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;1. Download&#039;&#039;&#039;&amp;lt;br&amp;gt;Which installer file to pick for your PC.&amp;lt;br&amp;gt;[[Downloads|Downloads page]]&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;2. Install&#039;&#039;&#039;&amp;lt;br&amp;gt;Database, installer and Setup4j, step by step.&amp;lt;br&amp;gt;[[Install Guide|Install Guide]]&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;3. First login&#039;&#039;&#039;&amp;lt;br&amp;gt;Default user, then set up your first materials and orders.&amp;lt;br&amp;gt;[[First Login|First Login]]&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;Already installed?&#039;&#039;&#039;&amp;lt;br&amp;gt;Upgrading to a newer version.&amp;lt;br&amp;gt;[[Upgrading|Upgrading]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;What is on a label, and how do I change it?&#039;&#039;&#039;&amp;lt;br&amp;gt;Start with [[Label Layouts]] for a plain-language tour of the pallet label, then [[Changing a Label]] to make your first change in half an hour.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=The core suite=&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;width:100%; max-width:980px; margin:0 auto; text-align:center; border-spacing:12px; table-layout:fixed;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Commander4j_256x256.png|link=[[Commander4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[Commander4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Production recording, pallet and case labelling, despatch, quality, waste and weight checks. The core application.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Middleware4j_256x256.png|link=[[Middleware4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[Middleware4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Converts and routes files between your ERP and Commander4j (CSV, XML, IDOC, fixed width).&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LabelServer4j_256x256.png|link=[[LabelServer4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LabelServer4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Background service that sends label data to case and secondary labellers.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:AutoLab4j_256x256.png|link=[[AutoLab4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[AutoLab4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Automatic pallet labelling triggered by the production line (MODBUS).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Tools and utilities=&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;width:100%; max-width:980px; margin:0 auto; text-align:center; border-spacing:12px; table-layout:fixed;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:ZPLRenderer_256x256.png|link=[[ZPLRenderer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ZPLRenderer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Renders Zebra ZPL label commands on screen, from a file or over the network. Emulates a printer for testing.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LogoRenderer_256x256.png|link=[[LogoRenderer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LogoRenderer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Renders Logopak label templates and emulates a Logopak labeller&#039;s TCP protocol for local testing.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LogoClient_256x256.png|link=[[LogoClient]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LogoClient]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Companion to LogoRenderer for developing and testing solutions that talk to Logopak labellers.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:SocketTest_256x256.png|link=[[SocketTest]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SocketTest]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Emulate a TCP/IP client or server to test printers, labellers and other network devices.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:ModbusBridge_256x256.png|link=[[ModbusBridge]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ModbusBridge]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Relays values between a Modbus client and server, bridging communication between Modbus devices.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:ModbusClient_256x256.png|link=[[ModbusClient]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ModbusClient]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Connect to a Modbus server, then view and change register and coil values.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:ModbusServer_256x256.png|link=[[ModbusServer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ModbusServer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Run a Modbus server on your PC to simulate line equipment, then view and change its values.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:sftpTransfer_256x256.png|link=[[SFTPTransfer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SFTPTransfer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Moves files automatically between a local folder and a remote SFTP server in both directions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:SFTGet4j_256x256.png|link=[[SFTPGet]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SFTPGet]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Watches a remote SFTP folder and moves each file that appears to a local folder.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:SFTPSend4j_256x256.png|link=[[SFTPSend]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SFTPSend]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Watches a local folder and moves each file that appears to a remote SFTP folder.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:XMLViewer_256x256.png|link=[[XMLViewer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[XMLViewer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;A simple viewer for XML documents, handy for checking interface messages.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Menu4j_256x256.png|link=[[Menu4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[Menu4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Tree-based menu for organising and launching applications and command-line scripts from a single XML file.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:TreeDoc_256x256.png|link=[[TreeDoc]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[TreeDoc]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Creates plain-text documents that describe a folder structure.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LaunchPad_256x256.png|link=[[LaunchPad]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LaunchPad]]&#039;&#039;&#039;&amp;lt;br&amp;gt;A replacement for the Launchpad application that Apple removed in macOS 26.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:LaunchPad_256x256.png&amp;diff=2010</id>
		<title>File:LaunchPad 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:LaunchPad_256x256.png&amp;diff=2010"/>
		<updated>2026-11-06T15:58:04Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:LaunchPad 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:TreeDoc_256x256.png&amp;diff=2009</id>
		<title>File:TreeDoc 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:TreeDoc_256x256.png&amp;diff=2009"/>
		<updated>2026-11-06T15:58:03Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:TreeDoc 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Menu4j_256x256.png&amp;diff=2008</id>
		<title>File:Menu4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Menu4j_256x256.png&amp;diff=2008"/>
		<updated>2026-11-06T15:58:02Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:Menu4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:XMLViewer_256x256.png&amp;diff=2007</id>
		<title>File:XMLViewer 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:XMLViewer_256x256.png&amp;diff=2007"/>
		<updated>2026-11-06T15:58:01Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:XMLViewer 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:SFTPSend4j_256x256.png&amp;diff=2006</id>
		<title>File:SFTPSend4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:SFTPSend4j_256x256.png&amp;diff=2006"/>
		<updated>2026-11-06T15:58:00Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:SFTPSend4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:SFTGet4j_256x256.png&amp;diff=2005</id>
		<title>File:SFTGet4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:SFTGet4j_256x256.png&amp;diff=2005"/>
		<updated>2026-11-06T15:57:58Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:SFTGet4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:SftpTransfer_256x256.png&amp;diff=2004</id>
		<title>File:SftpTransfer 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:SftpTransfer_256x256.png&amp;diff=2004"/>
		<updated>2026-11-06T15:57:57Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:SftpTransfer 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:ModbusServer_256x256.png&amp;diff=2003</id>
		<title>File:ModbusServer 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:ModbusServer_256x256.png&amp;diff=2003"/>
		<updated>2026-11-06T15:57:56Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Refreshed application icon (Nov 2026)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Refreshed application icon (Nov 2026)&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:ModbusClient_256x256.png&amp;diff=2002</id>
		<title>File:ModbusClient 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:ModbusClient_256x256.png&amp;diff=2002"/>
		<updated>2026-11-06T15:57:55Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Refreshed application icon (Nov 2026)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Refreshed application icon (Nov 2026)&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:ModbusBridge_256x256.png&amp;diff=2001</id>
		<title>File:ModbusBridge 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:ModbusBridge_256x256.png&amp;diff=2001"/>
		<updated>2026-11-06T15:57:54Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Refreshed application icon (Nov 2026)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Refreshed application icon (Nov 2026)&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:SocketTest_256x256.png&amp;diff=2000</id>
		<title>File:SocketTest 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:SocketTest_256x256.png&amp;diff=2000"/>
		<updated>2026-11-06T15:57:53Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:SocketTest 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:LogoClient_256x256.png&amp;diff=1999</id>
		<title>File:LogoClient 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:LogoClient_256x256.png&amp;diff=1999"/>
		<updated>2026-11-06T15:57:52Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:LogoClient 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:LogoRenderer_256x256.png&amp;diff=1998</id>
		<title>File:LogoRenderer 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:LogoRenderer_256x256.png&amp;diff=1998"/>
		<updated>2026-11-06T15:57:51Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:LogoRenderer 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:ZPLRenderer_256x256.png&amp;diff=1997</id>
		<title>File:ZPLRenderer 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:ZPLRenderer_256x256.png&amp;diff=1997"/>
		<updated>2026-11-06T15:57:50Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:ZPLRenderer 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:AutoLab4j_256x256.png&amp;diff=1996</id>
		<title>File:AutoLab4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:AutoLab4j_256x256.png&amp;diff=1996"/>
		<updated>2026-11-06T15:57:49Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:AutoLab4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:LabelServer4j_256x256.png&amp;diff=1995</id>
		<title>File:LabelServer4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:LabelServer4j_256x256.png&amp;diff=1995"/>
		<updated>2026-11-06T15:57:48Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:LabelServer4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Middleware4j_256x256.png&amp;diff=1994</id>
		<title>File:Middleware4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Middleware4j_256x256.png&amp;diff=1994"/>
		<updated>2026-11-06T15:57:47Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:Middleware4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Commander4j_256x256.png&amp;diff=1993</id>
		<title>File:Commander4j 256x256.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Commander4j_256x256.png&amp;diff=1993"/>
		<updated>2026-11-06T15:57:46Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:Commander4j 256x256.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=SFTPSend&amp;diff=1992</id>
		<title>SFTPSend</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=SFTPSend&amp;diff=1992"/>
		<updated>2026-10-22T11:08:10Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-left:4px solid #1e40c8; background:#e8edfb; padding:0.7em 1em; margin:0 0 1em 0;&amp;quot;&amp;gt;&#039;&#039;&#039;sftpSend has been replaced by [[SFTPTransfer]].&#039;&#039;&#039; sftpTransfer handles both directions in one application (sending files to an SFTP server as well as collecting them), with a configuration window, a Windows service option, stability checks and email notifications. sftpSend is no longer being developed: existing installations keep working, but new installations should use [[SFTPTransfer|sftpTransfer]] instead.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary sftpSend is a utility which is designed to run as a service and it&#039;s purpose is to monitor a local folder for a file or files matching a mask and if found upload them to a remote SFTP machine. The local file is then removed.&lt;br /&gt;
&lt;br /&gt;
See the partner program called [[SFTPGet]]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the installer for your operating system from [[https://github.com/C4J/sftpSend/releases GitHub]].&lt;br /&gt;
Note that the installer for Windows and MacOS contains a private bundled Jave runtime. However the Linux version requires you to have a Java 17 runtime installed on your distro.&lt;br /&gt;
&lt;br /&gt;
I recommend that you don&#039;t install into Program Files folder on windows as this will encounter problems with read-only folder permissions.&lt;br /&gt;
&lt;br /&gt;
Once installed you need to configure the application using the two xml config files shown below.&lt;br /&gt;
&lt;br /&gt;
The program can be run from the command line in a terminal window, or configured as a service for unattended operation.&lt;br /&gt;
&lt;br /&gt;
If you want to setup the program to run as a service you need to open a command prompt with Admininstrator permissions, change into the folder where you installed the application and then run the command line as shown below.&lt;br /&gt;
&lt;br /&gt;
 sftpSend_Service /install sftp_Send&lt;br /&gt;
&lt;br /&gt;
You will then need to open up the services control panel within windows and change the account which the program uses to run. By default it will be &amp;quot;System&amp;quot; but you will probably need to create a windows account which has permissions to access the folder that you want to monitor for files.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Folder Structure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 SFTP Send&lt;br /&gt;
  ├── Images&lt;br /&gt;
  ├── lib&lt;br /&gt;
  │   ├── app&lt;br /&gt;
  │   ├── license&lt;br /&gt;
  │   └── mail&lt;br /&gt;
  ├── logs&lt;br /&gt;
  ├── send&lt;br /&gt;
  │   └── demo&lt;br /&gt;
  ├── ssh&lt;br /&gt;
  └── xml&lt;br /&gt;
      └── config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;config.xml&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;sftpSend2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;general&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;title&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;SFTP Example&amp;lt;/value&amp;gt;&lt;br /&gt;
	    &amp;lt;value id=&amp;quot;emailEnabled&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;false&amp;lt;/value&amp;gt;&lt;br /&gt;
	&amp;lt;/general&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;security&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remoteHost&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;1.2.3.4&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remotePort&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;22&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;checkKnownHosts&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;no&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;knownHostsFile&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./ssh/known_hosts&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;authType&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;user password&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;username&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;testuser&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;password&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;testpassword&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;privateKeyFile&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./ssh/sftpSend&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;privateKeyPasswordProtected&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;no&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;privateKeyPassword&amp;quot; encrypted=&amp;quot;no&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/security&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;source&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;localDir&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./send/&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;localFileMask&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;*.xml&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;backupDir&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;pollFrequencySeconds&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;5000&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;destination&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remoteDir&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;/remote/&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;tempFileExtension&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;.tmp&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/destination&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/sftpSend2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Email Settings}}&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=SFTPGet&amp;diff=1991</id>
		<title>SFTPGet</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=SFTPGet&amp;diff=1991"/>
		<updated>2026-10-22T11:08:08Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-left:4px solid #1e40c8; background:#e8edfb; padding:0.7em 1em; margin:0 0 1em 0;&amp;quot;&amp;gt;&#039;&#039;&#039;sftpGet has been replaced by [[SFTPTransfer]].&#039;&#039;&#039; sftpTransfer handles both directions in one application (collecting files from an SFTP server as well as sending them), with a configuration window, a Windows service option, stability checks and email notifications. sftpGet is no longer being developed: existing installations keep working, but new installations should use [[SFTPTransfer|sftpTransfer]] instead.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary sftpGet is a utility which is designed to run as a service and it&#039;s purpose is to monitor a folder on a remote SFTP server for a file or files matching a mask and if found download them to the local machine. The remote file is then removed.&lt;br /&gt;
&lt;br /&gt;
See the partner program called [[SFTPSend]]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Download the installer for your operating system from [[https://github.com/C4J/sftpGet/releases GitHub]].&lt;br /&gt;
Note that the installer for Windows and MacOS contains a private bundled Jave runtime. However the Linux version requires you to have a Java 17 runtime installed on your distro.&lt;br /&gt;
&lt;br /&gt;
I recommend that you don&#039;t install into Program Files folder on windows as this will encounter problems with read-only folder permissions.&lt;br /&gt;
&lt;br /&gt;
Once installed you need to configure the application using the two xml config files shown below.&lt;br /&gt;
&lt;br /&gt;
The program can be run from the command line in a terminal window, or configured as a service for unattended operation.&lt;br /&gt;
&lt;br /&gt;
If you want to setup the program to run as a service you need to open a command prompt with Admininstrator permissions, change into the folder where you installed the application and then run the command line as shown below.&lt;br /&gt;
&lt;br /&gt;
 sftpGet_Service /install sftp_Get&lt;br /&gt;
&lt;br /&gt;
You will then need to open up the services control panel within windows and change the account which the program uses to run. By default it will be &amp;quot;System&amp;quot; but you will probably need to create a windows account which has permissions to access the folder that you want to monitor for files.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Folder Structure&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 SFTP Get&lt;br /&gt;
  ├── Images&lt;br /&gt;
  │   └── icons&lt;br /&gt;
  │       └── SFTP_Get_Icons&lt;br /&gt;
  │           └── MyIcon.iconset&lt;br /&gt;
  ├── get&lt;br /&gt;
  │   └── demo&lt;br /&gt;
  ├── lib&lt;br /&gt;
  │   ├── app&lt;br /&gt;
  │   ├── license&lt;br /&gt;
  │   └── mail&lt;br /&gt;
  ├── logs&lt;br /&gt;
  ├── ssh&lt;br /&gt;
  └── xml&lt;br /&gt;
      └── config&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;config.xml&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;sftpGet2&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        &amp;lt;general&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;title&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;SFTP Get from SFTP Server&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;emailEnabled&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;false&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/general&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        &amp;lt;security&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remoteHost&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;192.168.1.51&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remotePort&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;22&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;checkKnownHosts&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;no&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;knownHostsFile&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./ssh/known_hosts&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;authType&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;user password&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;username&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;testuser&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;password&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;testpassword&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;privateKeyFile&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./ssh/sftpSend&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;privateKeyPasswordProtected&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;no&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;privateKeyPassword&amp;quot; encrypted=&amp;quot;no&amp;quot;/&amp;gt;      &lt;br /&gt;
        &amp;lt;/security&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        &amp;lt;source&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remoteDir&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;/My Remote Folder/&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;remoteFileMask&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;.xml&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;pollFrequencySeconds&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;20000&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        &amp;lt;destination&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;localDir&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./get/&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;localFileMask&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;*.xml&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;backupDir&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;./get/backup/&amp;lt;/value&amp;gt;&lt;br /&gt;
            &amp;lt;value id=&amp;quot;tempFileExtension&amp;quot; encrypted=&amp;quot;no&amp;quot;&amp;gt;.tmp&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/destination&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/sftpGet2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Email Settings}}&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=SFTPTransfer&amp;diff=1990</id>
		<title>SFTPTransfer</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=SFTPTransfer&amp;diff=1990"/>
		<updated>2026-10-22T09:53:43Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;SFTPTransfer&#039;&#039;&#039; is a general purpose file transfer utility that moves or synchronises files between a local filesystem and a remote SFTP server. It is a standalone Java application with no dependency on any other Commander4j component: it can be used on its own wherever files need to be exchanged with an SFTP server on a schedule, and it runs on any platform with a Java runtime. It runs either as a headless background service or as a desktop application with a settings window and live log, and it uploads (Put) and downloads (Get) in independent threads.&lt;br /&gt;
&lt;br /&gt;
SFTPTransfer replaces the earlier [[SFTPSend]] and [[SFTPGet]] tools with a single configurable service. Sites running [[Commander4j]] or [[Middleware4j]] typically use it to exchange files with ERP systems, customer portals, suppliers and print-and-apply labellers, but nothing in the program assumes those uses.&lt;br /&gt;
&lt;br /&gt;
This page describes version 6.19.&lt;br /&gt;
&lt;br /&gt;
[[File:SFTPTransfer.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
&lt;br /&gt;
SFTPTransfer polls a local folder (Put) and a remote folder (Get) at a configurable interval and transfers any file that matches a file mask. Each direction works in one of two modes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Move&#039;&#039;&#039; || Every matching file is copied to the other side and the source copy is deleted once the copy has been renamed into place. This is the default (Sync Mode unticked). Put can keep a local backup copy of each file it sends.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Sync&#039;&#039;&#039; || One-way mirror. New or changed files are copied, the source is left in place and the modified time is carried across so the file is not copied again. Optionally, files and folders that have disappeared from the source are deleted from the destination.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It handles authentication, retry, backup, archiving, logging and email notification without operator involvement.&lt;br /&gt;
&lt;br /&gt;
== Startup Modes ==&lt;br /&gt;
&lt;br /&gt;
SFTPTransfer supports two startup modes selected by the first command line argument:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Argument !! Behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Desktop&#039;&#039;&#039; || &amp;lt;code&amp;gt;desktop&amp;lt;/code&amp;gt; || Opens the settings window. Transfer threads start paused; press Run in the toolbar to begin polling. Used to configure the program and to watch transfers.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Service&#039;&#039;&#039; || &amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt; || Headless. Transfer threads start immediately and run until the process is stopped. Used for production deployment as a background service.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The program reads its configuration from &amp;lt;code&amp;gt;./xml/config&amp;lt;/code&amp;gt; relative to the working directory, so it must be started from its installation folder. To run it by hand:&lt;br /&gt;
&lt;br /&gt;
 java -Dlog4j.configurationFile=./xml/config/log4j2.xml -jar sftpTransfer.jar desktop&lt;br /&gt;
 java -Dlog4j.configurationFile=./xml/config/log4j2.xml -jar sftpTransfer.jar service&lt;br /&gt;
&lt;br /&gt;
The native install packages provide launchers for each mode:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Launcher !! Mode !! Use&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer&amp;lt;/code&amp;gt; || Desktop || Settings window and live log.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Console&amp;lt;/code&amp;gt; || Service, in a console window || Runs the service logic with the log visible on screen. Useful during initial configuration.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service&amp;lt;/code&amp;gt; || Service || On Windows this executable registers and controls the Windows service, see [[#Installing as a Windows Service|Installing as a Windows Service]]. On Linux and macOS use systemd, launchd or nohup with the &amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt; argument.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A desktop window and a service can run on the same machine at the same time, see [[#Running the Desktop Beside a Service|Running the Desktop Beside a Service]].&lt;br /&gt;
&lt;br /&gt;
== Installation Folder ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Folder or file !! Contents&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;xml/config/&amp;lt;/code&amp;gt; || The configuration files described below, plus the runtime files &amp;lt;code&amp;gt;reload.request&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;service.lock&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;xml/config/examples/&amp;lt;/code&amp;gt; || Neutral example copies of every configuration file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ssh/&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;known_hosts&amp;lt;/code&amp;gt; and, if key authentication is used, the private and public key files.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;safety/&amp;lt;/code&amp;gt; || The template &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt; files copied by the Create buttons, see [[#Safe Files|Safe Files]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;logs/&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;sftpTransfer.log&amp;lt;/code&amp;gt; and its rolled-over archives.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;send/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;receive/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;backups/&amp;lt;/code&amp;gt; || Default local, download and backup folders used by the example configuration. Any folder can be configured instead.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Desktop Window ==&lt;br /&gt;
&lt;br /&gt;
The window has the settings tabs on the left and a combined log on the right, separated by a draggable divider.&lt;br /&gt;
&lt;br /&gt;
=== Tabs ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Tab !! Settings&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SFTP&#039;&#039;&#039; || Title, SFTP host and port, known hosts handling, authentication type, SFTP username and password, private and public key files, email, daily statistics and web log viewer switches, settings password. Saved in &amp;lt;code&amp;gt;sftp_common.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Put Properties&#039;&#039;&#039; || Upload settings. Saved in &amp;lt;code&amp;gt;sftp_put.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Get Properties&#039;&#039;&#039; || Download settings. Saved in &amp;lt;code&amp;gt;sftp_get.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;jsch Properties&#039;&#039;&#039; || Advanced SSH session parameters passed to the JSch library. Saved in &amp;lt;code&amp;gt;jsch_properties.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Email Properties&#039;&#039;&#039; || SMTP properties and the three distribution lists, plus a Send Test Email button. Saved in &amp;lt;code&amp;gt;email_properties.xml&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;email_distribution_properties.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Toolbar ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Button !! Action&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Run / Pause&#039;&#039;&#039; || Starts or pauses the transfer threads of this window. A pass that is under way stops at the next file boundary: the file in flight is finished, the remaining files wait for the next poll, and the pass summary and Transfer email record that the pass was paused. Pausing closes the SFTP sessions. Disabled while a service is running on the same machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Apply&#039;&#039;&#039; || Saves the settings on screen to &amp;lt;code&amp;gt;xml/config&amp;lt;/code&amp;gt;, hands them to the running threads and writes a reload request for any service running on this machine. Enabled only when the form differs from what is on disk.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Reload&#039;&#039;&#039; || Re-reads the saved files into the form, discarding edits that have not been applied.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Help&#039;&#039;&#039; || Opens this page in the default browser.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;About&#039;&#039;&#039; and &#039;&#039;&#039;Licences&#039;&#039;&#039; || Version and third party licence information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Settings are taken up by each thread between passes: a transfer pass that is in progress finishes with the old settings, including any sync deletions, and the status line shows &amp;quot;Waiting for the current transfer to complete&amp;quot; until both threads have changed over. Only Pause and a service stop interrupt a pass; Apply never does. Every Apply drops the SFTP sessions and reconnects with the new settings on the next pass.&lt;br /&gt;
&lt;br /&gt;
The Local Folder, Remote Folder and Backup Folder fields each have a browse button. The remote browse connects with the SFTP settings as typed on the SFTP tab, so the paths can be chosen before anything has been applied or run.&lt;br /&gt;
&lt;br /&gt;
=== Log Panel ===&lt;br /&gt;
&lt;br /&gt;
The log panel shows the Put, Get and System logs merged in time order, each line prefixed &amp;lt;code&amp;gt;[PUT]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[GET]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[SYS]&amp;lt;/code&amp;gt;. Long lines wrap. The strip above the log holds:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Control !! Action&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;System / Put / Get&#039;&#039;&#039; || Hide or show each log. Hidden lines are kept and reappear when the box is ticked again. All three are ticked at every start.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Clear&#039;&#039;&#039; || Empties the log window. The log file and the web viewer are not affected.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Save&#039;&#039;&#039; || Writes the lines currently shown to a text file (default &amp;lt;code&amp;gt;logs/sftpTransfer_window_&amp;lt;date&amp;gt;.txt&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Log Level&#039;&#039;&#039; || Errors only, Warnings and errors, Normal or Debug. Applies to new lines. Normal hides the polling of the remote folders; Debug shows every &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;. The choice is remembered in &amp;lt;code&amp;gt;sftp_common.xml&amp;lt;/code&amp;gt;. A running service keeps its level until the next Apply.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Two progress bars beneath the strip, Put (orange) and Get (blue), show the file being transferred, the percentage and the bytes so far. A finished file stays on show until the next one starts.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
All configuration is held in XML files under &amp;lt;code&amp;gt;xml/config/&amp;lt;/code&amp;gt;. Every value has an &amp;lt;code&amp;gt;encrypted&amp;lt;/code&amp;gt; attribute; passwords are stored encrypted and are set from the desktop window, never typed into the file. Settings added in later versions are optional: a file written by an earlier version is read with the defaults shown below.&lt;br /&gt;
&lt;br /&gt;
=== sftp_common.xml ===&lt;br /&gt;
&lt;br /&gt;
The connection and the program-wide switches, shared by Put and Get:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title || Free text shown in the window title, the web page and email subjects.&lt;br /&gt;
|-&lt;br /&gt;
| Host Address, Port || SFTP server and port (default 22). There is one server: Put and Get both use it.&lt;br /&gt;
|-&lt;br /&gt;
| Known Hosts File, Add to Known Hosts File || Path to the &amp;lt;code&amp;gt;known_hosts&amp;lt;/code&amp;gt; file (default &amp;lt;code&amp;gt;./ssh/known_hosts&amp;lt;/code&amp;gt;) and whether an unknown host key is added automatically.&lt;br /&gt;
|-&lt;br /&gt;
| Authentication Type || &amp;lt;code&amp;gt;user password&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;user public key&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SFTP Username, SFTP Password || SFTP login. The password is set with the Assign SFTP user password button and stored encrypted.&lt;br /&gt;
|-&lt;br /&gt;
| Private Key File, Public Key File, Key Comment, Private Key Password || Key pair for public key authentication (default &amp;lt;code&amp;gt;./ssh/sftpTransfer&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.pub&amp;lt;/code&amp;gt;). The Create button generates a new pair. The key password is set with its Assign button and stored encrypted.&lt;br /&gt;
|-&lt;br /&gt;
| Email Notifications || Master switch for all email, see [[#Email Notifications|Email Notifications]]. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Daily Statistics Email, at || Sends the day&#039;s transfer counts to the Monitor list once a day at the given time (HH:mm, &#039;&#039;&#039;UTC&#039;&#039;&#039;, not this machine&#039;s clock, so servers in different time zones report on the same day boundary). Default off, 06:00.&lt;br /&gt;
|-&lt;br /&gt;
| Web Log Viewer, Port || Serves the logs as a read-only web page, see [[#Web Log Viewer|Web Log Viewer]]. Default off, port 8080.&lt;br /&gt;
|-&lt;br /&gt;
| SettingsPassword || Optional. When set, the desktop window asks for it at start-up before the settings can be seen or changed. Set and cleared with its own buttons.&lt;br /&gt;
|-&lt;br /&gt;
| Log Level || The desktop log level, written whenever the combo is changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sftp_put.xml ===&lt;br /&gt;
&lt;br /&gt;
The upload (Put) settings:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Enabled || Whether the Put thread transfers anything. A disabled side logs a warning at start-up and does nothing.&lt;br /&gt;
|-&lt;br /&gt;
| Title || Free text, shown in the Put log and emails.&lt;br /&gt;
|-&lt;br /&gt;
| Local Folder || Folder watched for outbound files. Must contain &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Local File Mask || One or more wildcard masks separated by &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;*.xml;*.csv&amp;lt;/code&amp;gt;. See [[#File Masks|File Masks]].&lt;br /&gt;
|-&lt;br /&gt;
| Backup Folder, Backup Retention || Move mode only. Each sent file is copied here (sub folder structure preserved) before the local copy is deleted, and copies older than the retention period in days are purged. Greyed out in Sync Mode. The purge only runs when a marker file named &amp;lt;code&amp;gt;backup.folder&amp;lt;/code&amp;gt; exists in the backup folder.&lt;br /&gt;
|-&lt;br /&gt;
| Poll Frequency || Seconds between passes, 1 to 86400 (one day). A value outside that range is refused by Apply with a message naming the field. Default 10.&lt;br /&gt;
|-&lt;br /&gt;
| Remote Folder || Destination folder on the server. Must contain &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Temporary File Extension || Files are uploaded under this extension (default &amp;lt;code&amp;gt;.tmp&amp;lt;/code&amp;gt;) and renamed on completion, so the remote side never sees a partial file. Files carrying the extension are never selected for transfer.&lt;br /&gt;
|-&lt;br /&gt;
| Include Sub Folders || Also send files from folders beneath the local folder, recreating the structure on the server. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Mode || Copy new or changed files and leave the local files in place. Unticked means move mode. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Overwrite Newer || Sync only. Also replace a newer remote file with an older local one. Default on.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Deletions || Sync only. Also delete remote files which are no longer in the local folder. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Folder Deletions || Sync only, needs Include Sub Folders and Sync Deletions. Also remove remote folders which are no longer in the local folder. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Stability Check, Seconds, Retries || Only transfer a file once it has stopped changing for the given number of seconds. A file that is still changing after the wait is checked again, up to Retries times, each after another full wait; only then is it skipped until the next poll. Retries 0 restores the single check. Default off, 5 seconds, 5 retries (an installation upgraded from an earlier version gets 5). With the defaults one file that keeps growing can hold a pass for up to six times the stability seconds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sftp_get.xml ===&lt;br /&gt;
&lt;br /&gt;
The download (Get) settings have the same options seen from the other side:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Enabled || Whether the Get thread transfers anything.&lt;br /&gt;
|-&lt;br /&gt;
| Title || Free text, shown in the Get log and emails.&lt;br /&gt;
|-&lt;br /&gt;
| Remote Folder || Folder on the server polled for incoming files. Must contain &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Remote File Mask || One or more wildcard masks separated by &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, matched against the remote listing.&lt;br /&gt;
|-&lt;br /&gt;
| Local Folder || Folder where downloaded files are saved. Must contain &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Poll Frequency || Seconds between passes, 1 to 86400 (one day). A value outside that range is refused by Apply with a message naming the field. Default 10.&lt;br /&gt;
|-&lt;br /&gt;
| Temporary File Extension || Files are downloaded under this extension and renamed on completion.&lt;br /&gt;
|-&lt;br /&gt;
| Include Sub Folders || Also fetch files from folders beneath the remote folder.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Mode || Copy new or changed files and leave the remote files in place. Unticked means move mode (the remote file is deleted after a completed download).&lt;br /&gt;
|-&lt;br /&gt;
| Overwrite Newer || Sync only. Also replace a newer local file with an older remote one. Default on.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Deletions || Sync only. Also delete local files which are no longer in the remote folder.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Folder Deletions || Sync only. Also remove local folders which are no longer in the remote folder.&lt;br /&gt;
|-&lt;br /&gt;
| Stability Check, Seconds, Retries || Only fetch a file once the remote listing shows it unchanged for the given number of seconds. A file that is still changing is listed again, up to Retries times, each after another full wait, before it is skipped until the next poll. Retries 0 restores the single check. Default off, 5 seconds, 5 retries.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== jsch_properties.xml ===&lt;br /&gt;
&lt;br /&gt;
Session parameters passed directly to the JSch library: strict host key checking, preferred authentication methods, key exchange, cipher, MAC and host key algorithm lists, compression and proxy settings. Each row can be enabled or disabled and encrypted individually. The shipped defaults suit most servers; change them only when a server insists on a particular algorithm.&lt;br /&gt;
&lt;br /&gt;
=== email_properties.xml ===&lt;br /&gt;
&lt;br /&gt;
Jakarta Mail SMTP properties. Six rows are always present and cannot be removed: &amp;lt;code&amp;gt;mail.smtp.host&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.port&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.from&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.auth&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.user&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mail.smtp.password&amp;lt;/code&amp;gt;; a file that lacks any of them gains the row, disabled and empty, the next time the desktop is opened. The &#039;&#039;&#039;Add Property&#039;&#039;&#039; button beside Send Test Email offers the usual TLS, SSL, socket factory, timeout, charset and debug properties with suggested values, or any other name typed in; &#039;&#039;&#039;Remove Property&#039;&#039;&#039; deletes the selected row and refuses the six required ones. The password row is stored encrypted. Rows with Enable unticked are left out of the session. A server that answers &amp;lt;code&amp;gt;530 ... anonymous mail&amp;lt;/code&amp;gt; or a similar authentication error usually needs &amp;lt;code&amp;gt;mail.smtp.auth&amp;lt;/code&amp;gt; enabled and set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== email_distribution_properties.xml ===&lt;br /&gt;
&lt;br /&gt;
The three distribution lists. Each has an address list (comma separated), an Enable flag and a Frequency in minutes, see [[#Email Notifications|Email Notifications]].&lt;br /&gt;
&lt;br /&gt;
=== log4j2.xml ===&lt;br /&gt;
&lt;br /&gt;
Log file location, rollover and retention, see [[#Logging|Logging]].&lt;br /&gt;
&lt;br /&gt;
== Safe Files ==&lt;br /&gt;
&lt;br /&gt;
A transfer pass does nothing unless both of these files exist:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File !! Where&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt; || In the root of the Local Folder (Put and Get each have their own).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt; || In the root of the Remote Folder on the server.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The files prove that the configured folders are the intended ones and that any network share or mount behind them is actually present. Without them a mistyped path, an unmounted share or an empty folder could otherwise look like &amp;quot;nothing to send&amp;quot; or, with Sync Deletions on, empty the other side. Only the name matters, not the content.&lt;br /&gt;
&lt;br /&gt;
* The Put and Get tabs have Create (tick) and Remove (cross) buttons beside the Local Folder and Remote Folder fields. Create copies the template from the &amp;lt;code&amp;gt;safety&amp;lt;/code&amp;gt; folder into the folder typed in the field, after showing the full path and asking for confirmation. The remote buttons open their own SFTP session.&lt;br /&gt;
* A missing safe file is logged once as a warning (&amp;lt;code&amp;gt;Nothing sent, safe file not found : ...&amp;lt;/code&amp;gt;) and again after Apply or a restart; transfers resume at the next poll once the file appears.&lt;br /&gt;
* The safe files are never transferred, deleted or counted, whatever the file mask.&lt;br /&gt;
* The remote check lists the remote folder, so the SFTP account must be permitted to list it.&lt;br /&gt;
* Create the local file only while any share it lives on is mounted, otherwise the empty mount point is what gets approved.&lt;br /&gt;
&lt;br /&gt;
When upgrading from a version before 6.10, nothing transfers until the safe files have been created. Where the remote server is owned by another party they will need to place &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt; for you.&lt;br /&gt;
&lt;br /&gt;
== File Masks ==&lt;br /&gt;
&lt;br /&gt;
The Local File Mask (Put) and Remote File Mask (Get) accept the wildcards &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;. Several masks can be given separated by &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;*.xml;*.csv&amp;lt;/code&amp;gt;; spaces around a mask are ignored.&lt;br /&gt;
&lt;br /&gt;
* Put matching is case-insensitive; Get matching follows the server listing and is case-sensitive.&lt;br /&gt;
* A blank mask matches nothing on both sides.&lt;br /&gt;
* Files carrying the Temporary File Extension are always skipped, even with a mask of &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;.&lt;br /&gt;
* A folder whose name matches the mask is skipped, never transferred or deleted.&lt;br /&gt;
* The mask is also the scope of Sync Deletions: only files matching it are deleted from the destination.&lt;br /&gt;
&lt;br /&gt;
== Transfer Behaviour ==&lt;br /&gt;
&lt;br /&gt;
=== Move Mode ===&lt;br /&gt;
&lt;br /&gt;
Move mode is in force when Sync Mode is unticked.&lt;br /&gt;
&lt;br /&gt;
# Each poll collects the files matching the mask (and, with Include Sub Folders, those in folders beneath).&lt;br /&gt;
# With Stability Check on, the thread waits until the collection is the configured number of seconds old, then re-checks each file&#039;s size and modified time. A file that has changed is waited for again, up to the configured number of Retries (logged as &amp;lt;code&amp;gt;Still changing ... retry n of m&amp;lt;/code&amp;gt;); a file that is still changing after the last retry is skipped with a warning and picked up on the next poll.&lt;br /&gt;
# Put: the file is copied to the backup folder if backup is on, uploaded under the temporary extension, renamed to its final name, and only then deleted locally. Get: the file is downloaded under the temporary extension, renamed, and only then deleted from the server. A partial transfer is removed and the source is left in place.&lt;br /&gt;
# Sub folders are created on the destination as needed. The configured folders themselves are never created or removed, and emptied source sub folders are left in place.&lt;br /&gt;
# A file that keeps failing is retried and logged on every poll. There is no error folder.&lt;br /&gt;
&lt;br /&gt;
=== Sync Mode ===&lt;br /&gt;
&lt;br /&gt;
Sync Mode is a one-way mirror from source to destination; the source is never deleted. For each file the destination copy is compared by size and modified time:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Destination copy !! Action&lt;br /&gt;
|-&lt;br /&gt;
| Missing, older, or same time with a different size || Transferred. The modified time is carried across.&lt;br /&gt;
|-&lt;br /&gt;
| Identical (same size and time) || Skipped silently.&lt;br /&gt;
|-&lt;br /&gt;
| Newer than the source || Transferred only when Overwrite Newer is ticked. Otherwise kept, logged at Debug level only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With Include Sub Folders on, empty folders are created on the destination too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sync Deletions&#039;&#039;&#039;: at the end of each folder, a destination file is deleted when it matches the mask, does not carry the temporary extension and no file of that name exists in the matching source folder. Folders are never removed by this option, and folders that exist only at the destination are left alone with their contents. Nothing is deleted when a folder cannot be listed or when the pass is interrupted. An empty source folder (with its safe file present) empties the destination of mask-matching files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sync Folder Deletions&#039;&#039;&#039; (needs Include Sub Folders and Sync Deletions): a folder that exists only at the destination has its mask-matching files deleted and is removed once it is empty. A folder still holding a file the mask does not cover is kept with that file. A folder is only judged to be destination-only when nothing of that name exists at the source, including a file or a link.&lt;br /&gt;
&lt;br /&gt;
Each folder is processed in full (transfers, then deletions) before the next one is started, and a log line &amp;lt;code&amp;gt;Folder &amp;lt;path&amp;gt;&amp;lt;/code&amp;gt; is written before the first action in a folder.&lt;br /&gt;
&lt;br /&gt;
Points to note:&lt;br /&gt;
&lt;br /&gt;
* Do not tick Sync Deletions on both Put and Get against the same pair of folders.&lt;br /&gt;
* Sync Folder Deletions treats every folder beneath the destination as in scope. A &amp;quot;processed&amp;quot; folder created on the server by another system, or an archive folder beneath the receive folder, will lose its mask-matching files.&lt;br /&gt;
* On a Mac, Finder&#039;s &amp;lt;code&amp;gt;.DS_Store&amp;lt;/code&amp;gt; file does not match a mask such as &amp;lt;code&amp;gt;*.xml&amp;lt;/code&amp;gt;, so a browsed folder is emptied but not removed.&lt;br /&gt;
* Backup is for move mode: in Sync Mode the source file is still there, so the backup row is greyed out and no backup copy is taken.&lt;br /&gt;
&lt;br /&gt;
=== Pass Summary ===&lt;br /&gt;
&lt;br /&gt;
Every pass that transferred, failed or skipped at least one file ends with &amp;lt;code&amp;gt;Transfer finished - n sent, n failed, n skipped in n s&amp;lt;/code&amp;gt;. A pass that does not run to its end says instead &amp;lt;code&amp;gt;Transfer interrupted by shutdown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Transfer paused from the window&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Transfer abandoned, connection lost&amp;lt;/code&amp;gt;, followed by the same counts, and the Transfer email for that pass carries an &amp;lt;code&amp;gt;Outcome&amp;lt;/code&amp;gt; row saying so and listing the files that did get through; the rest are sent or fetched on the next poll. A pass with nothing to do writes nothing at the Normal log level, so an idle service produces a quiet log.&lt;br /&gt;
&lt;br /&gt;
Each thread disconnects from the server at the end of every pass and reconnects at the start of the next, so a long poll interval never leaves an idle session for a firewall or the server to drop. The log therefore shows Connecting, Connected and Disconnected on every pass, including an idle one.&lt;br /&gt;
&lt;br /&gt;
== Applying Settings to a Running Service ==&lt;br /&gt;
&lt;br /&gt;
A service reads &amp;lt;code&amp;gt;xml/config&amp;lt;/code&amp;gt; at start-up and whenever the file &amp;lt;code&amp;gt;xml/config/reload.request&amp;lt;/code&amp;gt; appears. The desktop&#039;s Apply button writes the settings and then writes that file; a service on the same machine collects it within a second, re-reads the six configuration files, hands the settings to its threads (between passes) and deletes the file. The desktop status line reports whether a service collected the request.&lt;br /&gt;
&lt;br /&gt;
An empty &amp;lt;code&amp;gt;reload.request&amp;lt;/code&amp;gt; created by any other means works too, so settings prepared on another machine can be copied into place and activated without restarting the service. If any configuration file fails to parse, the service logs an error, keeps its current settings and drops the request. A stale request found at service start-up is removed.&lt;br /&gt;
&lt;br /&gt;
== Running the Desktop Beside a Service ==&lt;br /&gt;
&lt;br /&gt;
A service holds an operating system lock on &amp;lt;code&amp;gt;xml/config/service.lock&amp;lt;/code&amp;gt; for as long as it runs. A desktop window started in the same installation folder detects it within a couple of seconds and:&lt;br /&gt;
&lt;br /&gt;
* shows a banner &amp;quot;A service is running on this machine - transfers and the web log viewer are its job. Apply hands it the new settings.&amp;quot;;&lt;br /&gt;
* disables its Run button, and if transfers were running from the window, pauses them at the end of the current pass;&lt;br /&gt;
* leaves the web log viewer to the service.&lt;br /&gt;
&lt;br /&gt;
When the service stops, the banner clears and the window&#039;s Run button and viewer come back. The browse buttons and safe file buttons work regardless, as they open their own short-lived sessions. The lock file is left behind when the service stops; this is normal.&lt;br /&gt;
&lt;br /&gt;
== Web Log Viewer ==&lt;br /&gt;
&lt;br /&gt;
When Web Log Viewer is ticked on the SFTP tab, the program serves its log on &amp;lt;code&amp;gt;http://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;/code&amp;gt; (default port 8080) in both desktop and service mode. The page shows the same merged Put, Get and System log as the desktop, with a Log Level selector (remembered by the browser), System / Put / Get check boxes, the thread states, a text filter, auto-scroll and Clear. It updates live and recovers the backlog after a reconnect.&lt;br /&gt;
&lt;br /&gt;
Read-only endpoints for monitoring tools:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! URL !! Returns&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; || The log page.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/api/status&amp;lt;/code&amp;gt; || JSON with version, title and the Put and Get thread states.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/api/log?dest=put&amp;amp;#124;get&amp;amp;#124;sys&amp;lt;/code&amp;gt; || JSON backlog for one log, optionally &amp;lt;code&amp;gt;&amp;amp;after=&amp;lt;seq&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/events&amp;lt;/code&amp;gt; || Server-sent event stream of new log lines.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The viewer has no login and listens on every network interface. Log lines include the SFTP host, username and file names, so keep the port on the LAN or behind a firewall. If the port is in use the program logs a warning and carries on transferring; a service retries the port every few seconds.&lt;br /&gt;
&lt;br /&gt;
== Email Notifications ==&lt;br /&gt;
&lt;br /&gt;
Email is off unless Email Notifications is ticked on the SFTP tab and the SMTP properties are filled in on the Email Properties tab. Messages are routed through three distribution lists:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! List !! Receives !! Shipped default&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Monitor&#039;&#039;&#039; || Started and Stopped (service start and shutdown, Run and Pause in the desktop) and the Daily Statistics Email (files and bytes sent and received, failures, errors raised and emailed). || Enabled, frequency 0&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Error&#039;&#039;&#039; || One message per error event: Connection failed, Connection lost, Upload failed, Download failed, Local folder not found, Remote folder could not be listed, Safe file missing, Local delete failed, Remote delete failed, Backup copy failed. Connection failed is sent once per outage, however many polls fail, and a Connection lost (a session dropped part-way through a pass) opens an outage in the same way. Either is followed by a single Connection restored message (with the time the outage started and its length) when the next connection succeeds. A folder listing that failed because the session dropped is reported as Connection lost alone, not also as Remote folder could not be listed. || Enabled, frequency 15 minutes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Transfer&#039;&#039;&#039; || One message per pass that transferred at least one file, listing the files and sizes (Put Files sent, Get Files received). Passes with nothing to do send nothing; failures go to the Error list. || Disabled, frequency 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Subjects follow the pattern &amp;lt;code&amp;gt;SFTP Transfer &amp;lt;version&amp;gt; [Put|Get] &amp;lt;Event&amp;gt; for [&amp;lt;title&amp;gt;] on &amp;lt;host&amp;gt;&amp;lt;/code&amp;gt;. The body is an HTML table of label and value rows (Time, Host, Title, Folder, File, Reason, Files and so on; paths are shown in a fixed-width font) followed by a blank gap so that a corporate disclaimer appended by the mail server sits clear of the detail. The Time row is in UTC. The Frequency of a list suppresses a repeat of the same subject within that many minutes, so a file that fails on every poll produces one email per interval rather than one per poll; a suppressed email is noted in the log. A connection that stays down produces one Connection failed email for the whole outage, whatever the Frequency, and one Connection restored email when the link is back; every failed poll in between is logged as an error with a note that the email has already been sent. Because the Transfer list&#039;s subject is the same for every pass, &#039;&#039;&#039;its frequency must stay at 0&#039;&#039;&#039; or whole passes would be suppressed as repeats.&lt;br /&gt;
&lt;br /&gt;
The Send Test Email button on the Email Properties tab sends a message to a chosen list using the settings on screen and reports the result on the status line, without needing Email Notifications to be ticked.&lt;br /&gt;
&lt;br /&gt;
Each distribution list has an Enable flag and a comma separated address list. An installation upgraded from an earlier version gains the Transfer list, disabled, the first time the desktop is opened.&lt;br /&gt;
&lt;br /&gt;
== Installing as a Windows Service ==&lt;br /&gt;
&lt;br /&gt;
The Windows install package includes &amp;lt;code&amp;gt;sftpTransfer_Service.exe&amp;lt;/code&amp;gt;, a service-mode launcher built with install4j. This executable manages the Windows service directly; no additional wrapper is required.&lt;br /&gt;
&lt;br /&gt;
All service commands must be run from an elevated command prompt (Run as Administrator).&lt;br /&gt;
&lt;br /&gt;
The default Windows service name is &#039;&#039;&#039;sftpTransfer_Service&#039;&#039;&#039;. You can specify a different name as an optional second parameter, which allows several instances to run from separate installation folders on the same machine. If a custom name is used at install time, the same name must be passed to every subsequent command.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /install&amp;lt;/code&amp;gt; || Register as &#039;&#039;&#039;sftpTransfer_Service&#039;&#039;&#039; with automatic startup on boot&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /install &amp;quot;My SFTP Service&amp;quot;&amp;lt;/code&amp;gt; || Register with a custom service name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /install-demand&amp;lt;/code&amp;gt; || Register with manual startup only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /start&amp;lt;/code&amp;gt; || Start the service&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /stop&amp;lt;/code&amp;gt; || Stop the service (waits for graceful shutdown)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /restart&amp;lt;/code&amp;gt; || Restart the service&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /status&amp;lt;/code&amp;gt; || Query status (exit code: 0 = running, 3 = stopped)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /uninstall&amp;lt;/code&amp;gt; || Remove the service registration&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a custom service name was used at install time, append it to all subsequent commands:&lt;br /&gt;
&lt;br /&gt;
 sftpTransfer_Service.exe /start &amp;quot;My SFTP Service&amp;quot;&lt;br /&gt;
 sftpTransfer_Service.exe /stop &amp;quot;My SFTP Service&amp;quot;&lt;br /&gt;
 sftpTransfer_Service.exe /uninstall &amp;quot;My SFTP Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once installed, the service also appears in the Windows Services management console (&amp;lt;code&amp;gt;services.msc&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Before installing the service, configure and test with the desktop launcher &amp;lt;code&amp;gt;sftpTransfer.exe&amp;lt;/code&amp;gt; (threads start paused) or &amp;lt;code&amp;gt;sftpTransfer_Console.exe&amp;lt;/code&amp;gt; (service logic with the log in a console window). Once the service is installed, the desktop can still be opened alongside it to change settings, see [[#Running the Desktop Beside a Service|Running the Desktop Beside a Service]].&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Authentication is configured once on the SFTP tab and used by both directions:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method !! How to configure&lt;br /&gt;
|-&lt;br /&gt;
| User password || Authentication Type &amp;lt;code&amp;gt;user password&amp;lt;/code&amp;gt;. Enter the SFTP Username and set the SFTP Password with its Assign button.&lt;br /&gt;
|-&lt;br /&gt;
| User public key || Authentication Type &amp;lt;code&amp;gt;user public key&amp;lt;/code&amp;gt;. Point Private Key File and Public Key File at an existing pair, or press Create to generate a pair and then install the public key on the server yourself. If the private key is passphrase protected, set the passphrase with the Private Key Password Assign button.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Host keys are checked against the Known Hosts File. With Add to Known Hosts File ticked (or &amp;lt;code&amp;gt;StrictHostKeyChecking&amp;lt;/code&amp;gt; set to &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; in the jsch properties, as shipped) a new server&#039;s key is recorded on first connection.&lt;br /&gt;
&lt;br /&gt;
All SSH is handled by the JSch library with Bouncy Castle as the cryptographic provider.&lt;br /&gt;
&lt;br /&gt;
=== Password Encryption ===&lt;br /&gt;
&lt;br /&gt;
The SFTP password, the private key passphrase, the SMTP password and the settings password are stored encrypted in the XML files. They are set through the desktop window: each password field has an Assign button that opens a dialog, and the encrypted value is written when settings are applied. Plain text passwords are never stored. The encrypted values are specific to SFTPTransfer and cannot be copied from the configuration of other Commander4j programs.&lt;br /&gt;
&lt;br /&gt;
== Thread Architecture ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Thread !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| TransferPUT || Polls the local folder and uploads. Opens its own SFTP session for each pass and closes it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| TransferGET || Polls the remote folder and downloads. Opens its own SFTP session for each pass and closes it afterwards, so Put and Get can fail and reconnect independently.&lt;br /&gt;
|-&lt;br /&gt;
| EmailThread || Sends queued emails asynchronously so a slow SMTP server never delays a transfer.&lt;br /&gt;
|-&lt;br /&gt;
| ArchiveThread || Purges backup copies older than the retention period.&lt;br /&gt;
|-&lt;br /&gt;
| StatsThread || Sends the Daily Statistics Email at the configured time.&lt;br /&gt;
|-&lt;br /&gt;
| ReloadWatcher || Service mode only. Watches for &amp;lt;code&amp;gt;reload.request&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the desktop the window&#039;s own browse and safe file buttons use a separate short-lived session.&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
&lt;br /&gt;
Every line shown in the window is also written to &amp;lt;code&amp;gt;logs/sftpTransfer.log&amp;lt;/code&amp;gt;, in both desktop and service mode, tagged &amp;lt;code&amp;gt;[PUT]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[GET]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[SYS]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[GUI]&amp;lt;/code&amp;gt; (the window&#039;s own connections). The log records:&lt;br /&gt;
&lt;br /&gt;
* Service or window start and stop, and the settings loaded or applied&lt;br /&gt;
* Connecting, Connected (with the server&#039;s SSH banner), Disconnected and Connection lost for each session&lt;br /&gt;
* Every command sent to the server (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stat&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;put&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rename&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;setstat&amp;lt;/code&amp;gt;), with the full paths on failure&lt;br /&gt;
* Folder headings, Sending / Sent, Receiving / Received with sizes and durations, stability retries and skips, sync deletions and the pass summary with its outcome&lt;br /&gt;
* Safe file warnings, reload requests, service lock and web viewer events&lt;br /&gt;
* Errors and exceptions with their reason&lt;br /&gt;
&lt;br /&gt;
The shipped &amp;lt;code&amp;gt;log4j2.xml&amp;lt;/code&amp;gt; rolls the file over at 10 MB or daily, keeps 14 days of compressed archives and logs at &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;. The listing of the remote folders on an idle poll is written at &amp;lt;code&amp;gt;trace&amp;lt;/code&amp;gt;; set the root level to &amp;lt;code&amp;gt;trace&amp;lt;/code&amp;gt; to see it in the file.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Library !! Version !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| JSch || 2.27.9 || SSH / SFTP client&lt;br /&gt;
|-&lt;br /&gt;
| Bouncy Castle || 1.86 || Cryptographic provider for JSch&lt;br /&gt;
|-&lt;br /&gt;
| Apache Commons IO || 2.21.0 || Wildcard file matching&lt;br /&gt;
|-&lt;br /&gt;
| Jakarta Mail / Angus Mail || 2.1.5 / 2.0.5 || Email notifications&lt;br /&gt;
|-&lt;br /&gt;
| Log4j || 2.25.5 || Logging&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Source code and installers: https://github.com/C4J/sftpTransfer&lt;br /&gt;
&lt;br /&gt;
See also: [[Middleware4j]], [[LabelServer4j]], [[Production Lines &amp;amp; Labellers]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=SFTPTransfer&amp;diff=1989</id>
		<title>SFTPTransfer</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=SFTPTransfer&amp;diff=1989"/>
		<updated>2026-10-20T13:40:07Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;SFTPTransfer&#039;&#039;&#039; is a general purpose file transfer utility that moves or synchronises files between a local filesystem and a remote SFTP server. It is a standalone Java application with no dependency on any other Commander4j component: it can be used on its own wherever files need to be exchanged with an SFTP server on a schedule, and it runs on any platform with a Java runtime. It runs either as a headless background service or as a desktop application with a settings window and live log, and it uploads (Put) and downloads (Get) in independent threads.&lt;br /&gt;
&lt;br /&gt;
SFTPTransfer replaces the earlier [[SFTPSend]] and [[SFTPGet]] tools with a single configurable service. Sites running [[Commander4j]] or [[Middleware4j]] typically use it to exchange files with ERP systems, customer portals, suppliers and print-and-apply labellers, but nothing in the program assumes those uses.&lt;br /&gt;
&lt;br /&gt;
This page describes version 6.18.&lt;br /&gt;
&lt;br /&gt;
[[File:SFTPTransfer.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
&lt;br /&gt;
SFTPTransfer polls a local folder (Put) and a remote folder (Get) at a configurable interval and transfers any file that matches a file mask. Each direction works in one of two modes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Move&#039;&#039;&#039; || Every matching file is copied to the other side and the source copy is deleted once the copy has been renamed into place. This is the default (Sync Mode unticked). Put can keep a local backup copy of each file it sends.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Sync&#039;&#039;&#039; || One-way mirror. New or changed files are copied, the source is left in place and the modified time is carried across so the file is not copied again. Optionally, files and folders that have disappeared from the source are deleted from the destination.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It handles authentication, retry, backup, archiving, logging and email notification without operator involvement.&lt;br /&gt;
&lt;br /&gt;
== Startup Modes ==&lt;br /&gt;
&lt;br /&gt;
SFTPTransfer supports two startup modes selected by the first command line argument:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Argument !! Behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Desktop&#039;&#039;&#039; || &amp;lt;code&amp;gt;desktop&amp;lt;/code&amp;gt; || Opens the settings window. Transfer threads start paused; press Run in the toolbar to begin polling. Used to configure the program and to watch transfers.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Service&#039;&#039;&#039; || &amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt; || Headless. Transfer threads start immediately and run until the process is stopped. Used for production deployment as a background service.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The program reads its configuration from &amp;lt;code&amp;gt;./xml/config&amp;lt;/code&amp;gt; relative to the working directory, so it must be started from its installation folder. To run it by hand:&lt;br /&gt;
&lt;br /&gt;
 java -Dlog4j.configurationFile=./xml/config/log4j2.xml -jar sftpTransfer.jar desktop&lt;br /&gt;
 java -Dlog4j.configurationFile=./xml/config/log4j2.xml -jar sftpTransfer.jar service&lt;br /&gt;
&lt;br /&gt;
The native install packages provide launchers for each mode:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Launcher !! Mode !! Use&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer&amp;lt;/code&amp;gt; || Desktop || Settings window and live log.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Console&amp;lt;/code&amp;gt; || Service, in a console window || Runs the service logic with the log visible on screen. Useful during initial configuration.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service&amp;lt;/code&amp;gt; || Service || On Windows this executable registers and controls the Windows service, see [[#Installing as a Windows Service|Installing as a Windows Service]]. On Linux and macOS use systemd, launchd or nohup with the &amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt; argument.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A desktop window and a service can run on the same machine at the same time, see [[#Running the Desktop Beside a Service|Running the Desktop Beside a Service]].&lt;br /&gt;
&lt;br /&gt;
== Installation Folder ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Folder or file !! Contents&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;xml/config/&amp;lt;/code&amp;gt; || The configuration files described below, plus the runtime files &amp;lt;code&amp;gt;reload.request&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;service.lock&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;xml/config/examples/&amp;lt;/code&amp;gt; || Neutral example copies of every configuration file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ssh/&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;known_hosts&amp;lt;/code&amp;gt; and, if key authentication is used, the private and public key files.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;safety/&amp;lt;/code&amp;gt; || The template &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt; files copied by the Create buttons, see [[#Safe Files|Safe Files]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;logs/&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;sftpTransfer.log&amp;lt;/code&amp;gt; and its rolled-over archives.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;send/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;receive/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;backups/&amp;lt;/code&amp;gt; || Default local, download and backup folders used by the example configuration. Any folder can be configured instead.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Desktop Window ==&lt;br /&gt;
&lt;br /&gt;
The window has the settings tabs on the left and a combined log on the right, separated by a draggable divider.&lt;br /&gt;
&lt;br /&gt;
=== Tabs ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Tab !! Settings&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SFTP&#039;&#039;&#039; || Title, SFTP host and port, known hosts handling, authentication type, SFTP username and password, private and public key files, email, daily statistics and web log viewer switches, settings password. Saved in &amp;lt;code&amp;gt;sftp_common.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Put Properties&#039;&#039;&#039; || Upload settings. Saved in &amp;lt;code&amp;gt;sftp_put.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Get Properties&#039;&#039;&#039; || Download settings. Saved in &amp;lt;code&amp;gt;sftp_get.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;jsch Properties&#039;&#039;&#039; || Advanced SSH session parameters passed to the JSch library. Saved in &amp;lt;code&amp;gt;jsch_properties.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Email Properties&#039;&#039;&#039; || SMTP properties and the three distribution lists, plus a Send Test Email button. Saved in &amp;lt;code&amp;gt;email_properties.xml&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;email_distribution_properties.xml&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Toolbar ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Button !! Action&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Run / Pause&#039;&#039;&#039; || Starts or pauses the transfer threads of this window. A pass that is under way stops at the next file boundary: the file in flight is finished, the remaining files wait for the next poll, and the pass summary and Transfer email record that the pass was paused. Pausing closes the SFTP sessions. Disabled while a service is running on the same machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Apply&#039;&#039;&#039; || Saves the settings on screen to &amp;lt;code&amp;gt;xml/config&amp;lt;/code&amp;gt;, hands them to the running threads and writes a reload request for any service running on this machine. Enabled only when the form differs from what is on disk.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Reload&#039;&#039;&#039; || Re-reads the saved files into the form, discarding edits that have not been applied.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Help&#039;&#039;&#039; || Opens this page in the default browser.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;About&#039;&#039;&#039; and &#039;&#039;&#039;Licences&#039;&#039;&#039; || Version and third party licence information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Settings are taken up by each thread between passes: a transfer pass that is in progress finishes with the old settings, including any sync deletions, and the status line shows &amp;quot;Waiting for the current transfer to complete&amp;quot; until both threads have changed over. Only Pause and a service stop interrupt a pass; Apply never does. Every Apply drops the SFTP sessions and reconnects with the new settings on the next pass.&lt;br /&gt;
&lt;br /&gt;
The Local Folder, Remote Folder and Backup Folder fields each have a browse button. The remote browse connects with the SFTP settings as typed on the SFTP tab, so the paths can be chosen before anything has been applied or run.&lt;br /&gt;
&lt;br /&gt;
=== Log Panel ===&lt;br /&gt;
&lt;br /&gt;
The log panel shows the Put, Get and System logs merged in time order, each line prefixed &amp;lt;code&amp;gt;[PUT]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[GET]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[SYS]&amp;lt;/code&amp;gt;. Long lines wrap. The strip above the log holds:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Control !! Action&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;System / Put / Get&#039;&#039;&#039; || Hide or show each log. Hidden lines are kept and reappear when the box is ticked again. All three are ticked at every start.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Clear&#039;&#039;&#039; || Empties the log window. The log file and the web viewer are not affected.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Save&#039;&#039;&#039; || Writes the lines currently shown to a text file (default &amp;lt;code&amp;gt;logs/sftpTransfer_window_&amp;lt;date&amp;gt;.txt&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Log Level&#039;&#039;&#039; || Errors only, Warnings and errors, Normal or Debug. Applies to new lines. Normal hides the polling of the remote folders; Debug shows every &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;. The choice is remembered in &amp;lt;code&amp;gt;sftp_common.xml&amp;lt;/code&amp;gt;. A running service keeps its level until the next Apply.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Two progress bars beneath the strip, Put (orange) and Get (blue), show the file being transferred, the percentage and the bytes so far. A finished file stays on show until the next one starts.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
All configuration is held in XML files under &amp;lt;code&amp;gt;xml/config/&amp;lt;/code&amp;gt;. Every value has an &amp;lt;code&amp;gt;encrypted&amp;lt;/code&amp;gt; attribute; passwords are stored encrypted and are set from the desktop window, never typed into the file. Settings added in later versions are optional: a file written by an earlier version is read with the defaults shown below.&lt;br /&gt;
&lt;br /&gt;
=== sftp_common.xml ===&lt;br /&gt;
&lt;br /&gt;
The connection and the program-wide switches, shared by Put and Get:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Title || Free text shown in the window title, the web page and email subjects.&lt;br /&gt;
|-&lt;br /&gt;
| Host Address, Port || SFTP server and port (default 22). There is one server: Put and Get both use it.&lt;br /&gt;
|-&lt;br /&gt;
| Known Hosts File, Add to Known Hosts File || Path to the &amp;lt;code&amp;gt;known_hosts&amp;lt;/code&amp;gt; file (default &amp;lt;code&amp;gt;./ssh/known_hosts&amp;lt;/code&amp;gt;) and whether an unknown host key is added automatically.&lt;br /&gt;
|-&lt;br /&gt;
| Authentication Type || &amp;lt;code&amp;gt;user password&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;user public key&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| SFTP Username, SFTP Password || SFTP login. The password is set with the Assign SFTP user password button and stored encrypted.&lt;br /&gt;
|-&lt;br /&gt;
| Private Key File, Public Key File, Key Comment, Private Key Password || Key pair for public key authentication (default &amp;lt;code&amp;gt;./ssh/sftpTransfer&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.pub&amp;lt;/code&amp;gt;). The Create button generates a new pair. The key password is set with its Assign button and stored encrypted.&lt;br /&gt;
|-&lt;br /&gt;
| Email Notifications || Master switch for all email, see [[#Email Notifications|Email Notifications]]. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Daily Statistics Email, at || Sends the day&#039;s transfer counts to the Monitor list once a day at the given time (HH:mm, &#039;&#039;&#039;UTC&#039;&#039;&#039;, not this machine&#039;s clock, so servers in different time zones report on the same day boundary). Default off, 06:00.&lt;br /&gt;
|-&lt;br /&gt;
| Web Log Viewer, Port || Serves the logs as a read-only web page, see [[#Web Log Viewer|Web Log Viewer]]. Default off, port 8080.&lt;br /&gt;
|-&lt;br /&gt;
| SettingsPassword || Optional. When set, the desktop window asks for it at start-up before the settings can be seen or changed. Set and cleared with its own buttons.&lt;br /&gt;
|-&lt;br /&gt;
| Log Level || The desktop log level, written whenever the combo is changed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sftp_put.xml ===&lt;br /&gt;
&lt;br /&gt;
The upload (Put) settings:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Enabled || Whether the Put thread transfers anything. A disabled side logs a warning at start-up and does nothing.&lt;br /&gt;
|-&lt;br /&gt;
| Title || Free text, shown in the Put log and emails.&lt;br /&gt;
|-&lt;br /&gt;
| Local Folder || Folder watched for outbound files. Must contain &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Local File Mask || One or more wildcard masks separated by &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;*.xml;*.csv&amp;lt;/code&amp;gt;. See [[#File Masks|File Masks]].&lt;br /&gt;
|-&lt;br /&gt;
| Backup Folder, Backup Retention || Move mode only. Each sent file is copied here (sub folder structure preserved) before the local copy is deleted, and copies older than the retention period in days are purged. Greyed out in Sync Mode. The purge only runs when a marker file named &amp;lt;code&amp;gt;backup.folder&amp;lt;/code&amp;gt; exists in the backup folder.&lt;br /&gt;
|-&lt;br /&gt;
| Poll Frequency || Seconds between passes, 1 to 86400 (one day). A value outside that range is refused by Apply with a message naming the field. Default 10.&lt;br /&gt;
|-&lt;br /&gt;
| Remote Folder || Destination folder on the server. Must contain &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Temporary File Extension || Files are uploaded under this extension (default &amp;lt;code&amp;gt;.tmp&amp;lt;/code&amp;gt;) and renamed on completion, so the remote side never sees a partial file. Files carrying the extension are never selected for transfer.&lt;br /&gt;
|-&lt;br /&gt;
| Include Sub Folders || Also send files from folders beneath the local folder, recreating the structure on the server. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Mode || Copy new or changed files and leave the local files in place. Unticked means move mode. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Overwrite Newer || Sync only. Also replace a newer remote file with an older local one. Default on.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Deletions || Sync only. Also delete remote files which are no longer in the local folder. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Folder Deletions || Sync only, needs Include Sub Folders and Sync Deletions. Also remove remote folders which are no longer in the local folder. Default off.&lt;br /&gt;
|-&lt;br /&gt;
| Stability Check, Seconds, Retries || Only transfer a file once it has stopped changing for the given number of seconds. A file that is still changing after the wait is checked again, up to Retries times, each after another full wait; only then is it skipped until the next poll. Retries 0 restores the single check. Default off, 5 seconds, 5 retries (an installation upgraded from an earlier version gets 5). With the defaults one file that keeps growing can hold a pass for up to six times the stability seconds.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sftp_get.xml ===&lt;br /&gt;
&lt;br /&gt;
The download (Get) settings have the same options seen from the other side:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Enabled || Whether the Get thread transfers anything.&lt;br /&gt;
|-&lt;br /&gt;
| Title || Free text, shown in the Get log and emails.&lt;br /&gt;
|-&lt;br /&gt;
| Remote Folder || Folder on the server polled for incoming files. Must contain &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Remote File Mask || One or more wildcard masks separated by &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, matched against the remote listing.&lt;br /&gt;
|-&lt;br /&gt;
| Local Folder || Folder where downloaded files are saved. Must contain &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| Poll Frequency || Seconds between passes, 1 to 86400 (one day). A value outside that range is refused by Apply with a message naming the field. Default 10.&lt;br /&gt;
|-&lt;br /&gt;
| Temporary File Extension || Files are downloaded under this extension and renamed on completion.&lt;br /&gt;
|-&lt;br /&gt;
| Include Sub Folders || Also fetch files from folders beneath the remote folder.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Mode || Copy new or changed files and leave the remote files in place. Unticked means move mode (the remote file is deleted after a completed download).&lt;br /&gt;
|-&lt;br /&gt;
| Overwrite Newer || Sync only. Also replace a newer local file with an older remote one. Default on.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Deletions || Sync only. Also delete local files which are no longer in the remote folder.&lt;br /&gt;
|-&lt;br /&gt;
| Sync Folder Deletions || Sync only. Also remove local folders which are no longer in the remote folder.&lt;br /&gt;
|-&lt;br /&gt;
| Stability Check, Seconds, Retries || Only fetch a file once the remote listing shows it unchanged for the given number of seconds. A file that is still changing is listed again, up to Retries times, each after another full wait, before it is skipped until the next poll. Retries 0 restores the single check. Default off, 5 seconds, 5 retries.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== jsch_properties.xml ===&lt;br /&gt;
&lt;br /&gt;
Session parameters passed directly to the JSch library: strict host key checking, preferred authentication methods, key exchange, cipher, MAC and host key algorithm lists, compression and proxy settings. Each row can be enabled or disabled and encrypted individually. The shipped defaults suit most servers; change them only when a server insists on a particular algorithm.&lt;br /&gt;
&lt;br /&gt;
=== email_properties.xml ===&lt;br /&gt;
&lt;br /&gt;
Jakarta Mail SMTP properties. Six rows are always present and cannot be removed: &amp;lt;code&amp;gt;mail.smtp.host&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.port&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.from&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.auth&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mail.smtp.user&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mail.smtp.password&amp;lt;/code&amp;gt;; a file that lacks any of them gains the row, disabled and empty, the next time the desktop is opened. The &#039;&#039;&#039;Add Property&#039;&#039;&#039; button beside Send Test Email offers the usual TLS, SSL, socket factory, timeout, charset and debug properties with suggested values, or any other name typed in; &#039;&#039;&#039;Remove Property&#039;&#039;&#039; deletes the selected row and refuses the six required ones. The password row is stored encrypted. Rows with Enable unticked are left out of the session. A server that answers &amp;lt;code&amp;gt;530 ... anonymous mail&amp;lt;/code&amp;gt; or a similar authentication error usually needs &amp;lt;code&amp;gt;mail.smtp.auth&amp;lt;/code&amp;gt; enabled and set to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== email_distribution_properties.xml ===&lt;br /&gt;
&lt;br /&gt;
The three distribution lists. Each has an address list (comma separated), an Enable flag and a Frequency in minutes, see [[#Email Notifications|Email Notifications]].&lt;br /&gt;
&lt;br /&gt;
=== log4j2.xml ===&lt;br /&gt;
&lt;br /&gt;
Log file location, rollover and retention, see [[#Logging|Logging]].&lt;br /&gt;
&lt;br /&gt;
== Safe Files ==&lt;br /&gt;
&lt;br /&gt;
A transfer pass does nothing unless both of these files exist:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File !! Where&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;local.safe&amp;lt;/code&amp;gt; || In the root of the Local Folder (Put and Get each have their own).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt; || In the root of the Remote Folder on the server.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The files prove that the configured folders are the intended ones and that any network share or mount behind them is actually present. Without them a mistyped path, an unmounted share or an empty folder could otherwise look like &amp;quot;nothing to send&amp;quot; or, with Sync Deletions on, empty the other side. Only the name matters, not the content.&lt;br /&gt;
&lt;br /&gt;
* The Put and Get tabs have Create (tick) and Remove (cross) buttons beside the Local Folder and Remote Folder fields. Create copies the template from the &amp;lt;code&amp;gt;safety&amp;lt;/code&amp;gt; folder into the folder typed in the field, after showing the full path and asking for confirmation. The remote buttons open their own SFTP session.&lt;br /&gt;
* A missing safe file is logged once as a warning (&amp;lt;code&amp;gt;Nothing sent, safe file not found : ...&amp;lt;/code&amp;gt;) and again after Apply or a restart; transfers resume at the next poll once the file appears.&lt;br /&gt;
* The safe files are never transferred, deleted or counted, whatever the file mask.&lt;br /&gt;
* The remote check lists the remote folder, so the SFTP account must be permitted to list it.&lt;br /&gt;
* Create the local file only while any share it lives on is mounted, otherwise the empty mount point is what gets approved.&lt;br /&gt;
&lt;br /&gt;
When upgrading from a version before 6.10, nothing transfers until the safe files have been created. Where the remote server is owned by another party they will need to place &amp;lt;code&amp;gt;remote.safe&amp;lt;/code&amp;gt; for you.&lt;br /&gt;
&lt;br /&gt;
== File Masks ==&lt;br /&gt;
&lt;br /&gt;
The Local File Mask (Put) and Remote File Mask (Get) accept the wildcards &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt;. Several masks can be given separated by &amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;*.xml;*.csv&amp;lt;/code&amp;gt;; spaces around a mask are ignored.&lt;br /&gt;
&lt;br /&gt;
* Put matching is case-insensitive; Get matching follows the server listing and is case-sensitive.&lt;br /&gt;
* A blank mask matches nothing on both sides.&lt;br /&gt;
* Files carrying the Temporary File Extension are always skipped, even with a mask of &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;.&lt;br /&gt;
* A folder whose name matches the mask is skipped, never transferred or deleted.&lt;br /&gt;
* The mask is also the scope of Sync Deletions: only files matching it are deleted from the destination.&lt;br /&gt;
&lt;br /&gt;
== Transfer Behaviour ==&lt;br /&gt;
&lt;br /&gt;
=== Move Mode ===&lt;br /&gt;
&lt;br /&gt;
Move mode is in force when Sync Mode is unticked.&lt;br /&gt;
&lt;br /&gt;
# Each poll collects the files matching the mask (and, with Include Sub Folders, those in folders beneath).&lt;br /&gt;
# With Stability Check on, the thread waits until the collection is the configured number of seconds old, then re-checks each file&#039;s size and modified time. A file that has changed is waited for again, up to the configured number of Retries (logged as &amp;lt;code&amp;gt;Still changing ... retry n of m&amp;lt;/code&amp;gt;); a file that is still changing after the last retry is skipped with a warning and picked up on the next poll.&lt;br /&gt;
# Put: the file is copied to the backup folder if backup is on, uploaded under the temporary extension, renamed to its final name, and only then deleted locally. Get: the file is downloaded under the temporary extension, renamed, and only then deleted from the server. A partial transfer is removed and the source is left in place.&lt;br /&gt;
# Sub folders are created on the destination as needed. The configured folders themselves are never created or removed, and emptied source sub folders are left in place.&lt;br /&gt;
# A file that keeps failing is retried and logged on every poll. There is no error folder.&lt;br /&gt;
&lt;br /&gt;
=== Sync Mode ===&lt;br /&gt;
&lt;br /&gt;
Sync Mode is a one-way mirror from source to destination; the source is never deleted. For each file the destination copy is compared by size and modified time:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Destination copy !! Action&lt;br /&gt;
|-&lt;br /&gt;
| Missing, older, or same time with a different size || Transferred. The modified time is carried across.&lt;br /&gt;
|-&lt;br /&gt;
| Identical (same size and time) || Skipped silently.&lt;br /&gt;
|-&lt;br /&gt;
| Newer than the source || Transferred only when Overwrite Newer is ticked. Otherwise kept, logged at Debug level only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
With Include Sub Folders on, empty folders are created on the destination too.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sync Deletions&#039;&#039;&#039;: at the end of each folder, a destination file is deleted when it matches the mask, does not carry the temporary extension and no file of that name exists in the matching source folder. Folders are never removed by this option, and folders that exist only at the destination are left alone with their contents. Nothing is deleted when a folder cannot be listed or when the pass is interrupted. An empty source folder (with its safe file present) empties the destination of mask-matching files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sync Folder Deletions&#039;&#039;&#039; (needs Include Sub Folders and Sync Deletions): a folder that exists only at the destination has its mask-matching files deleted and is removed once it is empty. A folder still holding a file the mask does not cover is kept with that file. A folder is only judged to be destination-only when nothing of that name exists at the source, including a file or a link.&lt;br /&gt;
&lt;br /&gt;
Each folder is processed in full (transfers, then deletions) before the next one is started, and a log line &amp;lt;code&amp;gt;Folder &amp;lt;path&amp;gt;&amp;lt;/code&amp;gt; is written before the first action in a folder.&lt;br /&gt;
&lt;br /&gt;
Points to note:&lt;br /&gt;
&lt;br /&gt;
* Do not tick Sync Deletions on both Put and Get against the same pair of folders.&lt;br /&gt;
* Sync Folder Deletions treats every folder beneath the destination as in scope. A &amp;quot;processed&amp;quot; folder created on the server by another system, or an archive folder beneath the receive folder, will lose its mask-matching files.&lt;br /&gt;
* On a Mac, Finder&#039;s &amp;lt;code&amp;gt;.DS_Store&amp;lt;/code&amp;gt; file does not match a mask such as &amp;lt;code&amp;gt;*.xml&amp;lt;/code&amp;gt;, so a browsed folder is emptied but not removed.&lt;br /&gt;
* Backup is for move mode: in Sync Mode the source file is still there, so the backup row is greyed out and no backup copy is taken.&lt;br /&gt;
&lt;br /&gt;
=== Pass Summary ===&lt;br /&gt;
&lt;br /&gt;
Every pass that transferred, failed or skipped at least one file ends with &amp;lt;code&amp;gt;Transfer finished - n sent, n failed, n skipped in n s&amp;lt;/code&amp;gt;. A pass that does not run to its end says instead &amp;lt;code&amp;gt;Transfer interrupted by shutdown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Transfer paused from the window&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Transfer abandoned, connection lost&amp;lt;/code&amp;gt;, followed by the same counts, and the Transfer email for that pass carries an &amp;lt;code&amp;gt;Outcome&amp;lt;/code&amp;gt; row saying so and listing the files that did get through; the rest are sent or fetched on the next poll. A pass with nothing to do writes nothing at the Normal log level, so an idle service produces a quiet log.&lt;br /&gt;
&lt;br /&gt;
Each thread disconnects from the server at the end of every pass and reconnects at the start of the next, so a long poll interval never leaves an idle session for a firewall or the server to drop. The log therefore shows Connecting, Connected and Disconnected on every pass, including an idle one.&lt;br /&gt;
&lt;br /&gt;
== Applying Settings to a Running Service ==&lt;br /&gt;
&lt;br /&gt;
A service reads &amp;lt;code&amp;gt;xml/config&amp;lt;/code&amp;gt; at start-up and whenever the file &amp;lt;code&amp;gt;xml/config/reload.request&amp;lt;/code&amp;gt; appears. The desktop&#039;s Apply button writes the settings and then writes that file; a service on the same machine collects it within a second, re-reads the six configuration files, hands the settings to its threads (between passes) and deletes the file. The desktop status line reports whether a service collected the request.&lt;br /&gt;
&lt;br /&gt;
An empty &amp;lt;code&amp;gt;reload.request&amp;lt;/code&amp;gt; created by any other means works too, so settings prepared on another machine can be copied into place and activated without restarting the service. If any configuration file fails to parse, the service logs an error, keeps its current settings and drops the request. A stale request found at service start-up is removed.&lt;br /&gt;
&lt;br /&gt;
== Running the Desktop Beside a Service ==&lt;br /&gt;
&lt;br /&gt;
A service holds an operating system lock on &amp;lt;code&amp;gt;xml/config/service.lock&amp;lt;/code&amp;gt; for as long as it runs. A desktop window started in the same installation folder detects it within a couple of seconds and:&lt;br /&gt;
&lt;br /&gt;
* shows a banner &amp;quot;A service is running on this machine - transfers and the web log viewer are its job. Apply hands it the new settings.&amp;quot;;&lt;br /&gt;
* disables its Run button, and if transfers were running from the window, pauses them at the end of the current pass;&lt;br /&gt;
* leaves the web log viewer to the service.&lt;br /&gt;
&lt;br /&gt;
When the service stops, the banner clears and the window&#039;s Run button and viewer come back. The browse buttons and safe file buttons work regardless, as they open their own short-lived sessions. The lock file is left behind when the service stops; this is normal.&lt;br /&gt;
&lt;br /&gt;
== Web Log Viewer ==&lt;br /&gt;
&lt;br /&gt;
When Web Log Viewer is ticked on the SFTP tab, the program serves its log on &amp;lt;code&amp;gt;http://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;/code&amp;gt; (default port 8080) in both desktop and service mode. The page shows the same merged Put, Get and System log as the desktop, with a Log Level selector (remembered by the browser), System / Put / Get check boxes, the thread states, a text filter, auto-scroll and Clear. It updates live and recovers the backlog after a reconnect.&lt;br /&gt;
&lt;br /&gt;
Read-only endpoints for monitoring tools:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! URL !! Returns&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; || The log page.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/api/status&amp;lt;/code&amp;gt; || JSON with version, title and the Put and Get thread states.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/api/log?dest=put&amp;amp;#124;get&amp;amp;#124;sys&amp;lt;/code&amp;gt; || JSON backlog for one log, optionally &amp;lt;code&amp;gt;&amp;amp;after=&amp;lt;seq&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/events&amp;lt;/code&amp;gt; || Server-sent event stream of new log lines.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The viewer has no login and listens on every network interface. Log lines include the SFTP host, username and file names, so keep the port on the LAN or behind a firewall. If the port is in use the program logs a warning and carries on transferring; a service retries the port every few seconds.&lt;br /&gt;
&lt;br /&gt;
== Email Notifications ==&lt;br /&gt;
&lt;br /&gt;
Email is off unless Email Notifications is ticked on the SFTP tab and the SMTP properties are filled in on the Email Properties tab. Messages are routed through three distribution lists:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! List !! Receives !! Shipped default&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Monitor&#039;&#039;&#039; || Started and Stopped (service start and shutdown, Run and Pause in the desktop) and the Daily Statistics Email (files and bytes sent and received, failures, errors raised and emailed). || Enabled, frequency 0&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Error&#039;&#039;&#039; || One message per error event: Connection failed, Connection lost, Upload failed, Download failed, Local folder not found, Remote folder could not be listed, Safe file missing, Local delete failed, Remote delete failed, Backup copy failed. Connection failed is sent once per outage, however many polls fail, and is followed by a Connection restored message (with the time the outage started and its length) when the next connection succeeds. || Enabled, frequency 15 minutes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Transfer&#039;&#039;&#039; || One message per pass that transferred at least one file, listing the files and sizes (Put Files sent, Get Files received). Passes with nothing to do send nothing; failures go to the Error list. || Disabled, frequency 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Subjects follow the pattern &amp;lt;code&amp;gt;SFTP Transfer &amp;lt;version&amp;gt; [Put|Get] &amp;lt;Event&amp;gt; for [&amp;lt;title&amp;gt;] on &amp;lt;host&amp;gt;&amp;lt;/code&amp;gt;. The body is an HTML table of label and value rows (Time, Host, Title, Folder, File, Reason, Files and so on; paths are shown in a fixed-width font) followed by a blank gap so that a corporate disclaimer appended by the mail server sits clear of the detail. The Time row is in UTC. The Frequency of a list suppresses a repeat of the same subject within that many minutes, so a file that fails on every poll produces one email per interval rather than one per poll; a suppressed email is noted in the log. A connection that stays down produces one Connection failed email for the whole outage, whatever the Frequency, and one Connection restored email when the link is back; every failed poll in between is logged as an error with a note that the email has already been sent. Because the Transfer list&#039;s subject is the same for every pass, &#039;&#039;&#039;its frequency must stay at 0&#039;&#039;&#039; or whole passes would be suppressed as repeats.&lt;br /&gt;
&lt;br /&gt;
The Send Test Email button on the Email Properties tab sends a message to a chosen list using the settings on screen and reports the result on the status line, without needing Email Notifications to be ticked.&lt;br /&gt;
&lt;br /&gt;
Each distribution list has an Enable flag and a comma separated address list. An installation upgraded from an earlier version gains the Transfer list, disabled, the first time the desktop is opened.&lt;br /&gt;
&lt;br /&gt;
== Installing as a Windows Service ==&lt;br /&gt;
&lt;br /&gt;
The Windows install package includes &amp;lt;code&amp;gt;sftpTransfer_Service.exe&amp;lt;/code&amp;gt;, a service-mode launcher built with install4j. This executable manages the Windows service directly; no additional wrapper is required.&lt;br /&gt;
&lt;br /&gt;
All service commands must be run from an elevated command prompt (Run as Administrator).&lt;br /&gt;
&lt;br /&gt;
The default Windows service name is &#039;&#039;&#039;sftpTransfer_Service&#039;&#039;&#039;. You can specify a different name as an optional second parameter, which allows several instances to run from separate installation folders on the same machine. If a custom name is used at install time, the same name must be passed to every subsequent command.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /install&amp;lt;/code&amp;gt; || Register as &#039;&#039;&#039;sftpTransfer_Service&#039;&#039;&#039; with automatic startup on boot&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /install &amp;quot;My SFTP Service&amp;quot;&amp;lt;/code&amp;gt; || Register with a custom service name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /install-demand&amp;lt;/code&amp;gt; || Register with manual startup only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /start&amp;lt;/code&amp;gt; || Start the service&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /stop&amp;lt;/code&amp;gt; || Stop the service (waits for graceful shutdown)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /restart&amp;lt;/code&amp;gt; || Restart the service&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /status&amp;lt;/code&amp;gt; || Query status (exit code: 0 = running, 3 = stopped)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sftpTransfer_Service.exe /uninstall&amp;lt;/code&amp;gt; || Remove the service registration&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a custom service name was used at install time, append it to all subsequent commands:&lt;br /&gt;
&lt;br /&gt;
 sftpTransfer_Service.exe /start &amp;quot;My SFTP Service&amp;quot;&lt;br /&gt;
 sftpTransfer_Service.exe /stop &amp;quot;My SFTP Service&amp;quot;&lt;br /&gt;
 sftpTransfer_Service.exe /uninstall &amp;quot;My SFTP Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once installed, the service also appears in the Windows Services management console (&amp;lt;code&amp;gt;services.msc&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Before installing the service, configure and test with the desktop launcher &amp;lt;code&amp;gt;sftpTransfer.exe&amp;lt;/code&amp;gt; (threads start paused) or &amp;lt;code&amp;gt;sftpTransfer_Console.exe&amp;lt;/code&amp;gt; (service logic with the log in a console window). Once the service is installed, the desktop can still be opened alongside it to change settings, see [[#Running the Desktop Beside a Service|Running the Desktop Beside a Service]].&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Authentication is configured once on the SFTP tab and used by both directions:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method !! How to configure&lt;br /&gt;
|-&lt;br /&gt;
| User password || Authentication Type &amp;lt;code&amp;gt;user password&amp;lt;/code&amp;gt;. Enter the SFTP Username and set the SFTP Password with its Assign button.&lt;br /&gt;
|-&lt;br /&gt;
| User public key || Authentication Type &amp;lt;code&amp;gt;user public key&amp;lt;/code&amp;gt;. Point Private Key File and Public Key File at an existing pair, or press Create to generate a pair and then install the public key on the server yourself. If the private key is passphrase protected, set the passphrase with the Private Key Password Assign button.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Host keys are checked against the Known Hosts File. With Add to Known Hosts File ticked (or &amp;lt;code&amp;gt;StrictHostKeyChecking&amp;lt;/code&amp;gt; set to &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; in the jsch properties, as shipped) a new server&#039;s key is recorded on first connection.&lt;br /&gt;
&lt;br /&gt;
All SSH is handled by the JSch library with Bouncy Castle as the cryptographic provider.&lt;br /&gt;
&lt;br /&gt;
=== Password Encryption ===&lt;br /&gt;
&lt;br /&gt;
The SFTP password, the private key passphrase, the SMTP password and the settings password are stored encrypted in the XML files. They are set through the desktop window: each password field has an Assign button that opens a dialog, and the encrypted value is written when settings are applied. Plain text passwords are never stored. The encrypted values are specific to SFTPTransfer and cannot be copied from the configuration of other Commander4j programs.&lt;br /&gt;
&lt;br /&gt;
== Thread Architecture ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Thread !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| TransferPUT || Polls the local folder and uploads. Opens its own SFTP session for each pass and closes it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| TransferGET || Polls the remote folder and downloads. Opens its own SFTP session for each pass and closes it afterwards, so Put and Get can fail and reconnect independently.&lt;br /&gt;
|-&lt;br /&gt;
| EmailThread || Sends queued emails asynchronously so a slow SMTP server never delays a transfer.&lt;br /&gt;
|-&lt;br /&gt;
| ArchiveThread || Purges backup copies older than the retention period.&lt;br /&gt;
|-&lt;br /&gt;
| StatsThread || Sends the Daily Statistics Email at the configured time.&lt;br /&gt;
|-&lt;br /&gt;
| ReloadWatcher || Service mode only. Watches for &amp;lt;code&amp;gt;reload.request&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the desktop the window&#039;s own browse and safe file buttons use a separate short-lived session.&lt;br /&gt;
&lt;br /&gt;
== Logging ==&lt;br /&gt;
&lt;br /&gt;
Every line shown in the window is also written to &amp;lt;code&amp;gt;logs/sftpTransfer.log&amp;lt;/code&amp;gt;, in both desktop and service mode, tagged &amp;lt;code&amp;gt;[PUT]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[GET]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[SYS]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[GUI]&amp;lt;/code&amp;gt; (the window&#039;s own connections). The log records:&lt;br /&gt;
&lt;br /&gt;
* Service or window start and stop, and the settings loaded or applied&lt;br /&gt;
* Connecting, Connected (with the server&#039;s SSH banner), Disconnected and Connection lost for each session&lt;br /&gt;
* Every command sent to the server (&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stat&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;put&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rename&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;setstat&amp;lt;/code&amp;gt;), with the full paths on failure&lt;br /&gt;
* Folder headings, Sending / Sent, Receiving / Received with sizes and durations, stability retries and skips, sync deletions and the pass summary with its outcome&lt;br /&gt;
* Safe file warnings, reload requests, service lock and web viewer events&lt;br /&gt;
* Errors and exceptions with their reason&lt;br /&gt;
&lt;br /&gt;
The shipped &amp;lt;code&amp;gt;log4j2.xml&amp;lt;/code&amp;gt; rolls the file over at 10 MB or daily, keeps 14 days of compressed archives and logs at &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;. The listing of the remote folders on an idle poll is written at &amp;lt;code&amp;gt;trace&amp;lt;/code&amp;gt;; set the root level to &amp;lt;code&amp;gt;trace&amp;lt;/code&amp;gt; to see it in the file.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Library !! Version !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| JSch || 2.27.9 || SSH / SFTP client&lt;br /&gt;
|-&lt;br /&gt;
| Bouncy Castle || 1.86 || Cryptographic provider for JSch&lt;br /&gt;
|-&lt;br /&gt;
| Apache Commons IO || 2.21.0 || Wildcard file matching&lt;br /&gt;
|-&lt;br /&gt;
| Jakarta Mail / Angus Mail || 2.1.5 / 2.0.5 || Email notifications&lt;br /&gt;
|-&lt;br /&gt;
| Log4j || 2.25.5 || Logging&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Source code and installers: https://github.com/C4J/sftpTransfer&lt;br /&gt;
&lt;br /&gt;
See also: [[Middleware4j]], [[LabelServer4j]], [[Production Lines &amp;amp; Labellers]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Modules&amp;diff=1988</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Modules&amp;diff=1988"/>
		<updated>2026-10-15T19:26:57Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Commander4j]]&lt;br /&gt;
The modules database is populated automatically when you install or update the application. Unless you want to make changes to reports you would not normally make any changes to it.&lt;br /&gt;
&lt;br /&gt;
[[file:Modules2.png|link=|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Categories&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Forms || Screens within the Desktop Application or page on the Web page of mobile device &lt;br /&gt;
|-&lt;br /&gt;
| Functions || Used to enable permissions such as Add, Edit, Delete within Forms&lt;br /&gt;
|-&lt;br /&gt;
| Menus || Defines a Menu which can have Forms or Reports Assigned to it. &lt;br /&gt;
|-&lt;br /&gt;
| Reports || Can be a regular report which you can view on screen or a Label which is for barcode labels.  A Label module carries the printer settings (Group ID, Printer Type, Language, DPI and Direct Print) that decide which [[Label Printers|label printers]] are offered on the label screens. See [[Printer Queues]].&lt;br /&gt;
|-&lt;br /&gt;
| Executables || Link to External program &lt;br /&gt;
|-&lt;br /&gt;
| User Report || Used to allow customisation on the reporting and labelling system&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Printers&amp;diff=1987</id>
		<title>Label Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Printers&amp;diff=1987"/>
		<updated>2026-10-15T19:26:56Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Label Printers&#039;&#039;&#039; is where an administrator defines the network label printers that Commander4j talks to directly over TCP/IP: Zebra, Printronix, Logopak and Videojet devices. It is found under &#039;&#039;Pallet Transactions › Setup&#039;&#039; and again under &#039;&#039;Tray &amp;amp; Case Labels › Setup&#039;&#039;; both entries open the same screen.&lt;br /&gt;
&lt;br /&gt;
A printer defined here appears in the &#039;&#039;&#039;device&#039;&#039;&#039; drop-down of the label-printing screens, and it can be attached to a production line so that an external labelling program collects the label data. See [[Production Lines &amp;amp; Labellers]].&lt;br /&gt;
&lt;br /&gt;
[[file:LabelPrinters.png|link=|700px]]&lt;br /&gt;
&lt;br /&gt;
== The list ==&lt;br /&gt;
&lt;br /&gt;
Two filters sit above the list. &#039;&#039;&#039;Group&#039;&#039;&#039; narrows it to printers used for Pack, Pallet or General labels, or shows All. &#039;&#039;&#039;Type&#039;&#039;&#039; narrows it to one make, or shows every make when left blank.&lt;br /&gt;
&lt;br /&gt;
The columns are Printer ID, Group, Description, Type, Language, DPI, Paper Size, IP Address, Port, Enabled, Direct, Export, Format and Path. A line under the list shows how many printers match the filters.&lt;br /&gt;
&lt;br /&gt;
== Buttons ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Button !! Permission !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Add&#039;&#039;&#039; || FRM_PRINTER_ADD || Asks for a new Printer ID, then for its Group (Pack, Pallet or General), creates the printer and opens its properties. Cancelling the Group prompt abandons the add without a message.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Edit&#039;&#039;&#039; || FRM_PRINTER_EDIT || Opens the properties of the highlighted printer. Double-clicking a row does the same.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Delete&#039;&#039;&#039; || FRM_PRINTER_DELETE || After a confirmation, deletes the printer and removes it from every production line it was attached to.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Excel&#039;&#039;&#039; || || Exports the filtered list to a spreadsheet.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Print&#039;&#039;&#039; || || Prints the list as a report.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Help&#039;&#039;&#039;, &#039;&#039;&#039;Close&#039;&#039;&#039; || || Opens this page; closes the screen.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Printer properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Printer ID || Read-only once created. Stored in upper case, at most 30 characters.&lt;br /&gt;
|-&lt;br /&gt;
| Group ID || Pack, Pallet or General. Fixed when the printer is created; to change it, delete the printer and add it again.&lt;br /&gt;
|-&lt;br /&gt;
| Enabled || Only enabled printers are offered on the label screens.&lt;br /&gt;
|-&lt;br /&gt;
| Printer Type || Logopak, Printronix, Videojet or Zebra.&lt;br /&gt;
|-&lt;br /&gt;
| Direct Print || Tick when Commander4j should send the label to the printer&#039;s IP address and port itself, with no operating system print queue. Leave clear when an external labelling program prints from the exported data. See [[Printer Queues]] for how this is set up end to end.&lt;br /&gt;
|-&lt;br /&gt;
| Language || IGP/PGL, LEAP, ZPL or Zipher. Must match what the printer understands.&lt;br /&gt;
|-&lt;br /&gt;
| DPI || 200 or 300.&lt;br /&gt;
|-&lt;br /&gt;
| Paper Size || Width by height, for example 100x150. Stored without spaces.&lt;br /&gt;
|-&lt;br /&gt;
| Description || Free text shown in the list.&lt;br /&gt;
|-&lt;br /&gt;
| IP Address, Port || Where the printer listens. The defaults are 127.0.0.1 and 9100. Neither value is checked when saved, so a typing mistake only shows up when a label fails to print.&lt;br /&gt;
|-&lt;br /&gt;
| Data Export || Tick, then enter or browse to the folder where label data files should be written for an external labelling program, and choose the file Format: CSV, LQF or XML. The folder must be reachable by that program.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Save&#039;&#039;&#039; is only enabled after something has changed. &#039;&#039;&#039;Close&#039;&#039;&#039; discards unsaved edits without asking.&lt;br /&gt;
&lt;br /&gt;
== How a printer reaches the label screens ==&lt;br /&gt;
&lt;br /&gt;
Each label-printing screen has a device drop-down listing the print queues on the computer plus the printers defined here. A printer is only offered when it is Enabled, set to Direct Print, and its Type, Group, Language and DPI match the settings of that screen&#039;s module in [[Modules]]. The operator&#039;s choice is remembered per workstation and per screen. If a printer you expect is missing from a screen&#039;s list, compare those five settings first.&lt;br /&gt;
&lt;br /&gt;
When no device has been chosen on a screen, the label goes to the computer&#039;s default printer; see [[Select Printer]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Production Lines &amp;amp; Labellers]]&lt;br /&gt;
* [[Process Order Assign to Labeller]]&lt;br /&gt;
* [[Select Printer]]&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Case_Label&amp;diff=1986</id>
		<title>Case Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Case_Label&amp;diff=1986"/>
		<updated>2026-10-15T19:26:55Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Commander4j]]&lt;br /&gt;
[[file:Case_Label.png|link=|700px]]&lt;br /&gt;
&lt;br /&gt;
The above screen is used to print Case Labels.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There are two methods to print a label depending on the type of printer or labeller that you want to use. They are described on the [[Pallet Label#Switching to a barcode printer|Pallet Label]] page and in plain language on [[Label Layouts]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Case Label&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Description&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 1 || Process Order or Works Order Number can be typed in or picked using the lookup button.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Process Order Status is shown in &amp;lt;span style=&amp;quot;color:#FFFFFF; background:#ff0000&amp;quot;&amp;gt;RED&amp;lt;/span&amp;gt; if the order is closed.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Date of Manufacture will default to the computers system clock but you can amend it manually if necessary. The expiry date of the pallet is calculated by adding the shelf life to the date of manufacture.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || The screen determines what a full pallet quantity would contain by reference to [[Material UOMs]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Expiry Date is calculated by adding the Shelf Life settings found in the [[Materials]] screen to the Date of Manufacture but you can override if necessary.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Preview is only applicable for &amp;quot;Standard&amp;quot; reports which are created for any printer. If you change the RPT_PACK_LABEL module to use a Zebra ZPL compatible Label then you won&#039;t be able to preview the label on screen.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Number of labels.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || The Label button is used to generate a label and sent it do the printer from the desktop client and is subtly different to the Assign to Labeller button (10) which is used to drive external labelling applications such as the [[AutoLab4j]] application.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || This is the print queue or printer that you want the label to be sent to when using the Label button (8). Operating system print queues are listed first, followed by any Direct Print printers defined in [[Label Printers]], which are shown with a different icon and send the label straight to the printer&#039;s IP address. It is important to understand the difference between the two label printing mechanisms and the print queue requirements. See [[Printer Queues]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || See [[Process Order Assign to Labeller]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || The structure - content of the [[Batch Number]] gets its default format from the [[System Keys]] screen. However you can override it on the [[Customers]] screen. This allows the content of the label to be different depending on which customer id is assigned to the [[Process Orders]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file: Case_Label_Preview.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
The placeholders available on a case label differ slightly from a pallet label; see [[Label Fields#Case and tray labels|Label Fields]].&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Pallet_Label&amp;diff=1985</id>
		<title>Pallet Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Pallet_Label&amp;diff=1985"/>
		<updated>2026-10-15T19:26:54Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Commander4j]]&lt;br /&gt;
See also [[Production Declaration]] and [[Production Confirmation]]&lt;br /&gt;
&lt;br /&gt;
[[file:Pallet label2.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
The above screen is used to print Pallet Labels (labels which include a unique Serial Shipping Container Code - SSCC). The number sequence used is define in the [[System Keys]] screen.&lt;br /&gt;
&lt;br /&gt;
There are two methods to print a label depending on the type of printer or labeller that you want to use. They are described in the section [[#Switching to a barcode printer|Switching to a barcode printer]] below, and in plain language on [[Label Layouts]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Pallet Label&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Process Order or Works Order Number can be typed in or picked using the lookup button.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Process Order Status is shown in &amp;lt;span style=&amp;quot;color:#FFFFFF; background:#ff0000&amp;quot;&amp;gt;RED&amp;lt;/span&amp;gt; if the order is closed.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Date of Manufacture will default to the computers system clock but you can amend it manually if necessary. The expiry date of the pallet is calculated by adding the shelf life to the date of manufacture.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || The screen determines what a full pallet quantity would contain by reference to [[Material UOMs]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Expiry Date is calculated by adding the Shelf Life settings found in the [[Materials]] screen to the Date of Manufacture but you can override if necessary.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Preview is only applicable for &amp;quot;Standard&amp;quot; reports which are created for any printer. If you change the PALLET_LABEL module to use a Zebra ZPL compatible Label then you won&#039;t be able to preview the label on screen.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Number of SSCC&#039;s is not necessarily the same as number of labels. Some reports will print labels in pairs so 1 SSCC = 2 labels which have the same SSCC. This is common place as placing a pallet label on 2 difference faces of a pallet makes it more likely that at least one will be visible at all times.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || The Label button is used to generate a label and sent it do the printer from the desktop client and is subtly different to the Assign to Labeller button (10) which is used to drive external labelling applications such as the [[AutoLab4j]] application.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || This is the print queue or printer that you want the label to be sent to when using the Label button (8). Operating system print queues are listed first, followed by any Direct Print printers defined in [[Label Printers]], which are shown with a different icon and send the label straight to the printer&#039;s IP address. It is important to understand the difference between the two label printing mechanisms and the print queue requirements. See [[Printer Queues]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || See [[Process Order Assign to Labeller]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || The [[Confirmed Status]] checkbox is important as it triggers the generation of an outbound Production Declaration message. You have 2 options here. If you want to print all your labels in advance you can leave the confirmed checkbox unselected - you can then confirm each pallet using the Production Confirmation transaction on the desktop or scanner. If you want you can confirm as you print. The deciding factory comes back to traceability. If you want the date of manufacture to be accurate you should not confirm the pallet label when it is printed but do it when the pallet is actually ready to have the label applied.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || The structure - content of the [[Batch Number]] gets its default format from the [[System Keys]] screen. However you can override it on the [[Customers]] screen. This allows the content of the label to be different depending on which customer id is assigned to the [[Process Orders]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:Pallet_Label_Preview2.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
Examples of a pallet labels Zebra XiIII Plus (300dpi) **left** and Intermec IPL (200dpi) **right**&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:Zebra_Intermec_Pallet.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Switching to a barcode printer ==&lt;br /&gt;
&lt;br /&gt;
Labels designed for barcode printers rather than general reports are text templates held in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder. [[Label Layouts]] explains what is on a label and how the templates work, [[Zebra ZPL Label]] shows the standard template, and [[Label Template Syntax]] is the reference.&lt;br /&gt;
&lt;br /&gt;
You should be aware that there are two main methods for the application to send data to a printer which depends on the type of printer or labeller that you want to use.&lt;br /&gt;
&lt;br /&gt;
The default config after installing will be a label which can be sent to any standard desktop printer and has the advantage that when you print the label you have the option of displaying the label on screen.&lt;br /&gt;
&lt;br /&gt;
If you have a Zebra compatible barcode printer you can amend the configuration so that it sends ZPL commands to that printer. This will be faster to print and the quality of the barcode will be better.&lt;br /&gt;
&lt;br /&gt;
The following screens show how to change the report type. To create or change a layout of your own, follow [[Changing a Label]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Admin_Menu.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The screens below show how to switch pallet label types and reports. You should note that the Modules database is used to define screens as well as reports. To help reduce the number of items in the list you can filter them using the module type as shown here.&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Admin1.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
Select the report called &amp;quot;RPT_PALLET_LABEL&amp;quot; and click on the edit button.&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Pallet_Report1.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Pallet_Report2.png|link=|600px]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Layouts&amp;diff=1984</id>
		<title>Label Layouts</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Layouts&amp;diff=1984"/>
		<updated>2026-10-15T19:26:53Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:900px; padding:0.9em 1.2em; margin:0 0 1em 0; border:1px solid #c8d1e0; border-left:5px solid #1e40c8; border-radius:0 8px 8px 0; background:#f4f6fb;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;This page is the starting point for anyone who wants to know what is printed on a Commander4j label, or who needs to change it.&#039;&#039;&#039; You do not need to be a programmer to read it. Where a change does need technical help, the page says so.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What a pallet label looks like ==&lt;br /&gt;
&lt;br /&gt;
Every pallet that Commander4j records gets a label like the ones below. The left-hand label was printed on a Zebra printer, the right-hand one on an Intermec printer. Both carry the same information in the layout the [https://www.gs1.org/standards/barcodes/sscc GS1] standard expects, so a customer&#039;s warehouse can scan it on arrival.&lt;br /&gt;
&lt;br /&gt;
[[file:Zebra_Intermec_Pallet.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! What you see !! What it means !! Where the value comes from&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;My Company&#039;&#039;&#039; || Your company or customer name. || The [[Customers]] record attached to the process order.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;L1&#039;&#039;&#039; || Label number. When two labels are printed per pallet the second one says L2. || Counted automatically as labels are printed.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MATERIAL&#039;&#039;&#039; || Your product code. || [[Materials]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Your Label Header Text&#039;&#039;&#039; || An optional line of free text, the same on every label. || The &#039;&#039;&#039;LABEL_HEADER_COMMENT&#039;&#039;&#039; setting in [[System Keys]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SSCC&#039;&#039;&#039; || The 18-digit Serial Shipping Container Code. This number is unique to the pallet and is what the customer scans. || Generated by Commander4j from the number range in [[System Keys]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;CONTENT&#039;&#039;&#039; || The GTIN (EAN) of the case or unit on the pallet. || The unit of measure on the [[Materials]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;VARIANT&#039;&#039;&#039; || Two-digit GS1 variant for the case. || [[Materials]] unit of measure.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;COUNT&#039;&#039;&#039; || How many cases are on the pallet. || Entered on the [[Pallet Label]] screen, defaulting to a full pallet.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;LAYERS&#039;&#039;&#039; || How many layers of cases. || Calculated from the pallet quantity and the per-layer unit of measure on the [[Materials]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;DESCRIPTION&#039;&#039;&#039; || Product description. || [[Materials]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;BATCH/LOT&#039;&#039;&#039; || The batch number. || Built from the batch format in [[System Keys]], or overridden on the [[Customers]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;BEST BEFORE&#039;&#039;&#039; || The expiry date. || Date of manufacture plus the shelf life held on the [[Materials]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Top barcode&#039;&#039;&#039; || A GS1-128 barcode containing the content (02), variant (20), best before (15), count (37) and batch (10). || Built from the values above.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Bottom barcode&#039;&#039;&#039; || A GS1-128 barcode containing only the SSCC (00). || The pallet number.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Case and tray labels work the same way but carry no SSCC. See [[Case Label]].&lt;br /&gt;
&lt;br /&gt;
== How a label gets from the screen to the printer ==&lt;br /&gt;
&lt;br /&gt;
There are three ways Commander4j can produce a label, and which one you use decides how the label is designed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Route !! Designed with !! Best for !! Preview on screen?&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Standard report&#039;&#039;&#039; || [https://community.jaspersoft.com/download-jaspersoft/community-edition/ JasperSoft Studio], a free visual report designer. The label is a &amp;lt;code&amp;gt;.jrxml&amp;lt;/code&amp;gt; file in the &amp;lt;code&amp;gt;reports&amp;lt;/code&amp;gt; folder. || Any printer that has a normal Windows or Mac print queue, including office laser printers. This is how a fresh install is set up. || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Label template&#039;&#039;&#039; || A text file in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder, written in the printer&#039;s own command language with Commander4j placeholders for the values. || Industrial barcode printers (Zebra, Intermec, Printronix). Faster, and the barcodes are sharper. || No. Use [[ZPLRenderer|ZPL Renderer]] instead.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;External labeller&#039;&#039;&#039; || [[AutoLab4j]] prints the same template file on an automatic print-and-apply machine on the line. [[LabelServer4j]] drives case and secondary labellers from its own copy of the label files, kept in its own folders. || Lines where the labeller fires itself when a pallet or case is complete. || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Most sites start with the standard report and move to a label template when they install a barcode printer. The rest of this page is about label templates.&lt;br /&gt;
&lt;br /&gt;
== Which label file is used ==&lt;br /&gt;
&lt;br /&gt;
Commander4j decides which label to print in this order, and the last match wins:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;DEFAULT_PALLET_REPORT&#039;&#039;&#039; setting in [[System Keys]] (the module &#039;&#039;&#039;RPT_PALLET_LABEL&#039;&#039;&#039; after installation). Case labels use &#039;&#039;&#039;DEFAULT_PACK_REPORT&#039;&#039;&#039;.&lt;br /&gt;
# An override on the [[Material Types|Material Type]].&lt;br /&gt;
# If the material type has no override, an override on the [[Materials|Material]] itself.&lt;br /&gt;
# An override on the [[Customers|Customer]] attached to the process order.&lt;br /&gt;
&lt;br /&gt;
A module record in the [[Modules]] screen links a name such as RPT_PALLET_LABEL to a file, and says whether that file is a standard report or a label template. That is the screen you change when you want Commander4j to use a different label. [[Changing a Label]] walks through it.&lt;br /&gt;
&lt;br /&gt;
== Which printer language do I have? ==&lt;br /&gt;
&lt;br /&gt;
Label templates are written in the language the printer understands. Look at the make of your printer:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Printer make !! Language !! Example template on this wiki !! Preview tool&lt;br /&gt;
|-&lt;br /&gt;
| Zebra || ZPL || [[Zebra ZPL Label]] || [[ZPLRenderer|ZPL Renderer]] or [https://labelary.com/viewer.html Labelary]&lt;br /&gt;
|-&lt;br /&gt;
| Intermec / Honeywell || IPL || [[Intermec IPL Label]] || none&lt;br /&gt;
|-&lt;br /&gt;
| Printronix || IGP/PGL || shipped in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder || none&lt;br /&gt;
|-&lt;br /&gt;
| Logopak || LEAP || usually driven by [[LabelServer4j]] from its own label files; can also be defined as a direct printer in [[Label Printers]] || [[LogoRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| Videojet || Zipher || usually driven by [[LabelServer4j]]; can also be defined as a direct printer in [[Label Printers]] || none&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you are buying a printer and have a free choice, Zebra is the easiest to work with because the free ZPL Renderer shows you the label on screen without printing anything.&lt;br /&gt;
&lt;br /&gt;
== How hard is the change you want to make? ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Change !! Difficulty !! What you need !! Start here&lt;br /&gt;
|-&lt;br /&gt;
| Change a caption, a date format, or the company name. Move a field a little. Make text bigger or smaller. || &#039;&#039;&#039;Easy.&#039;&#039;&#039; Half an hour with a text editor. || A copy of the existing template and the list of placeholders. || [[Changing a Label]]&lt;br /&gt;
|-&lt;br /&gt;
| Add a value that is already in Commander4j to the label, for example the customer&#039;s part number. || &#039;&#039;&#039;Moderate.&#039;&#039;&#039; You need to find the right placeholder and a free space on the label. || [[Label Fields]] and a preview tool. || [[Label Fields]], then [[Changing a Label]]&lt;br /&gt;
|-&lt;br /&gt;
| Change what goes into a barcode, add a new barcode, or design a label from a blank sheet. || &#039;&#039;&#039;Technical.&#039;&#039;&#039; Needs knowledge of the printer language and of the GS1 barcode rules. || The printer&#039;s programming guide and [[Label Template Syntax]]. || [[Label Template Syntax]] and [[Useful Information]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you are on a support contract, the technical changes are the kind of thing to ask for. The easy and moderate ones are well within reach of a line supervisor or IT generalist.&lt;br /&gt;
&lt;br /&gt;
== Pages in this section ==&lt;br /&gt;
&lt;br /&gt;
* [[Changing a Label]] &amp;amp;ndash; a step-by-step walk-through of copying a template, changing one thing, previewing it and switching Commander4j over to it.&lt;br /&gt;
* [[Label Fields]] &amp;amp;ndash; every placeholder you can put on a label, with what it prints.&lt;br /&gt;
* [[Label Template Syntax]] &amp;amp;ndash; how a template file is put together.&lt;br /&gt;
* [[Label Function Syntax]] &amp;amp;ndash; the functions for formatting dates, padding numbers and trimming text.&lt;br /&gt;
* [[Zebra ZPL Label]] &amp;amp;ndash; the standard pallet label, explained block by block.&lt;br /&gt;
* [[Intermec IPL Label]] &amp;amp;ndash; the same label for an Intermec printer.&lt;br /&gt;
* [[Label Printers]] &amp;amp;ndash; defining network barcode printers.&lt;br /&gt;
* [[Printer Queues]] &amp;amp;ndash; how a label reaches the printer: through a raw print queue, or by Direct Print to the printer&#039;s IP address.&lt;br /&gt;
* [[ZPLRenderer|ZPL Renderer]] &amp;amp;ndash; see a Zebra label on screen without a printer.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Installation&amp;diff=1983</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Installation&amp;diff=1983"/>
		<updated>2026-10-15T19:26:52Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Installation&#039;&#039;&#039; covers the server-side components that an IT person sets up once the basics are working. For installing the database, the application and the database connection, follow the step-by-step [[Install Guide]] instead.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Task !! Page&lt;br /&gt;
|-&lt;br /&gt;
| Which file to download || [[Downloads]]&lt;br /&gt;
|-&lt;br /&gt;
| Install SQL Server Express, MySQL, MariaDB or Oracle || [[Install Database]]&lt;br /&gt;
|-&lt;br /&gt;
| Run the Commander4j installer (Full or Workstation) || [[Install Commander4j]]&lt;br /&gt;
|-&lt;br /&gt;
| Connect Commander4j to the database and create the tables || [[Setup4j]]&lt;br /&gt;
|-&lt;br /&gt;
| Log in for the first time || [[First Login]]&lt;br /&gt;
|-&lt;br /&gt;
| Move to a newer version || [[Upgrading]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The sections below are only needed for hand-held scanners, ERP interfaces and barcode printers.&lt;br /&gt;
&lt;br /&gt;
== Install Java ==&lt;br /&gt;
&lt;br /&gt;
The Windows and macOS installers include their own copy of Java, so a normal desktop installation needs nothing extra. You only need to install Java 25 yourself in two cases:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;The web component&#039;&#039;&#039; (the scanner web application) on the server that runs Apache Tomcat. Tomcat itself needs Java to run.&lt;br /&gt;
* &#039;&#039;&#039;The desktop application on Linux&#039;&#039;&#039;, because the Linux installer does not bundle Java.&lt;br /&gt;
&lt;br /&gt;
In both cases install the &#039;&#039;&#039;JDK&#039;&#039;&#039; (not the smaller JRE). The Azul Zulu JDK 25 from [https://www.azul.com/downloads/?package=jdk#zulu https://www.azul.com/downloads/?package=jdk#zulu] is recommended; on Windows choose the &amp;lt;code&amp;gt;.msi&amp;lt;/code&amp;gt; installer and tick the option to set &amp;lt;code&amp;gt;JAVA_HOME&amp;lt;/code&amp;gt;, which the Tomcat installer looks for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that the web application should be installed on a nominated server machine and not on workstations.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Install Tomcat 11.x ==&lt;br /&gt;
&lt;br /&gt;
Apache Tomcat 11 is required for the web component. Download it from the [https://tomcat.apache.org/download-11.cgi Apache Tomcat site]. On Windows choose the &#039;&#039;&#039;32-bit/64-bit Windows Service Installer&#039;&#039;&#039; so that Tomcat runs as a service and starts with the machine. The installer asks for the Java location: point it at the JDK you installed above.&lt;br /&gt;
&lt;br /&gt;
== Configure Tomcat / Web Application ==&lt;br /&gt;
&lt;br /&gt;
The web component of Commander4j is a single file, &#039;&#039;&#039;c4j_commander4j_web.war&#039;&#039;&#039;, included with every release from version 12.75 onwards (it replaced the three separate web applications of earlier releases, which are listed below for sites that still run them). It contains the scanner pages and the REST API they use.&lt;br /&gt;
&lt;br /&gt;
The servlet (.war) files shown below are intended to work on Zebra Mobile Computers which have the Zebra Enterprise Browser installed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Servlet !! Purpose !! Environment !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;c4j_commander4j_web.war&#039;&#039;&#039; || Pallet Transactions, Quality Grading, Issue / Return || Any Mobile Browser || * Recommended from 12.75&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;c4j_web_react.war&#039;&#039;&#039; || Pallet Transactions || Any Mobile Browser || Earlier releases&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;c4j_web_WS.war&#039;&#039;&#039; || Quality — Product Grading || Any Mobile Browser || Earlier releases; only needed for Quality Control&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;c4j_web_Issue.war&#039;&#039;&#039; || Issue Pallets to Order &amp;amp; Location || Tablet Mobile Browser || Earlier releases; Issue/Return of Stock&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Installing the web element of Commander4j is straightforward and requires copying files from the Commander4j install directory into the Tomcat directory:&lt;br /&gt;
&lt;br /&gt;
* Stop the Apache Tomcat service if it is running.&lt;br /&gt;
* Copy the file &#039;&#039;&#039;chosen_servlet.war&#039;&#039;&#039; from the Commander4j directory into the WebApps subdirectory of the Tomcat installation directory.&lt;br /&gt;
* Start the Apache Tomcat service.&lt;br /&gt;
* You should then notice that the &#039;&#039;&#039;chosen_servlet&#039;&#039;&#039; directory has been created under WebApps.&lt;br /&gt;
* Update the list of hosts the web application can connect to by copying &amp;quot;Commander4j/xml/hosts/hosts.xml&amp;quot; into &amp;quot;Tomcat/WebApps/&#039;&#039;&#039;chosen_servlet&#039;&#039;&#039;/xml/hosts&amp;quot;.&lt;br /&gt;
* Confirm this is working by opening the URL &#039;&#039;&#039;http://servername:8080/chosen_servlet/&#039;&#039;&#039;&lt;br /&gt;
* If you update the hosts.xml file for a servlet you will need to either restart Apache Tomcat or stop and start the servlet from the [http://localhost:8080/manager/html Apache Tomcat Manager].&lt;br /&gt;
* If you want to connect to a SQL Server database using Windows Integrated Authentication, copy the appropriate version of the auth DLL from the downloaded MS JDBC drivers (e.g. mssql-jdbc_auth-12.10.0.x64.dll) into the Java bin folder.&lt;br /&gt;
&lt;br /&gt;
=== Optional: allow other web servers to call the REST API (CORS) ===&lt;br /&gt;
&lt;br /&gt;
The scanner pages and the REST API are served from the same web application, so browsers need no special permission to use them. If pages served from &#039;&#039;&#039;another&#039;&#039;&#039; web server (a different host name or port) need to call the API from the browser, Tomcat must be told to allow cross-origin requests. Tomcat includes a filter for this. Add the following inside the &amp;lt;code&amp;gt;&amp;amp;lt;web-app&amp;amp;gt;&amp;lt;/code&amp;gt; element of &amp;lt;code&amp;gt;conf\web.xml&amp;lt;/code&amp;gt; in the Tomcat installation folder, then restart the Tomcat service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;filter&amp;gt;&lt;br /&gt;
	&amp;lt;filter-name&amp;gt;CorsFilter&amp;lt;/filter-name&amp;gt;&lt;br /&gt;
	&amp;lt;filter-class&amp;gt;org.apache.catalina.filters.CorsFilter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;
	&amp;lt;init-param&amp;gt;&lt;br /&gt;
		&amp;lt;param-name&amp;gt;cors.allowed.origins&amp;lt;/param-name&amp;gt;&lt;br /&gt;
		&amp;lt;param-value&amp;gt;*&amp;lt;/param-value&amp;gt;&lt;br /&gt;
	&amp;lt;/init-param&amp;gt;&lt;br /&gt;
	&amp;lt;init-param&amp;gt;&lt;br /&gt;
		&amp;lt;param-name&amp;gt;cors.allowed.methods&amp;lt;/param-name&amp;gt;&lt;br /&gt;
		&amp;lt;param-value&amp;gt;GET,POST,PUT,DELETE,HEAD,OPTIONS&amp;lt;/param-value&amp;gt;&lt;br /&gt;
	&amp;lt;/init-param&amp;gt;&lt;br /&gt;
	&amp;lt;init-param&amp;gt;&lt;br /&gt;
		&amp;lt;param-name&amp;gt;cors.allowed.headers&amp;lt;/param-name&amp;gt;&lt;br /&gt;
		&amp;lt;param-value&amp;gt;Content-Type,X-Requested-With,Accept,Authorization,Origin,Access-Control-Request-Method,Access-Control-Request-Headers&amp;lt;/param-value&amp;gt;&lt;br /&gt;
	&amp;lt;/init-param&amp;gt;&lt;br /&gt;
	&amp;lt;init-param&amp;gt;&lt;br /&gt;
		&amp;lt;param-name&amp;gt;cors.exposed.headers&amp;lt;/param-name&amp;gt;&lt;br /&gt;
		&amp;lt;param-value&amp;gt;Access-Control-Allow-Origin,Access-Control-Allow-Credentials&amp;lt;/param-value&amp;gt;&lt;br /&gt;
	&amp;lt;/init-param&amp;gt;&lt;br /&gt;
&amp;lt;/filter&amp;gt;&lt;br /&gt;
&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;
	&amp;lt;filter-name&amp;gt;CorsFilter&amp;lt;/filter-name&amp;gt;&lt;br /&gt;
	&amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two things to be aware of. Placing the filter in &amp;lt;code&amp;gt;conf\web.xml&amp;lt;/code&amp;gt; applies it to every web application on that Tomcat, including the Tomcat manager, so only do this on a Tomcat dedicated to Commander4j. And because &amp;lt;code&amp;gt;cors.allowed.origins&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, the filter does not pass the login cookie across origins (Tomcat&#039;s &amp;lt;code&amp;gt;cors.support.credentials&amp;lt;/code&amp;gt; setting stays at its default of &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;); a page on another server can therefore only call API functions that do not need a logged-in session. To allow a logged-in session from another server, replace &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; with that server&#039;s exact origin, for example &amp;lt;code&amp;gt;http://scanner-pages.example.local:8080&amp;lt;/code&amp;gt;, and add an &amp;lt;code&amp;gt;init-param&amp;lt;/code&amp;gt; setting &amp;lt;code&amp;gt;cors.support.credentials&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Create Commander4j Services ==&lt;br /&gt;
&lt;br /&gt;
See [[Install_Interface_Services|Install Interface Services]].&lt;br /&gt;
&lt;br /&gt;
== Install Local Middleware ==&lt;br /&gt;
&lt;br /&gt;
The local middleware service handles the processing of inbound and outbound interface files between Commander4j and external systems such as an ERP. It runs as a background service on the Commander4j server machine and is configured via the [[Interface_Admin|Interface Admin]] screen within the application.&lt;br /&gt;
&lt;br /&gt;
To install the interface service:&lt;br /&gt;
&lt;br /&gt;
* Ensure Commander4j has been installed using the &#039;&#039;&#039;Full&#039;&#039;&#039; install option, which includes the service wrapper components.&lt;br /&gt;
* Open Commander4j, navigate to &#039;&#039;&#039;System &amp;gt; Interface Admin&#039;&#039;&#039; and verify that your interface definitions are configured correctly.&lt;br /&gt;
* Use the &#039;&#039;&#039;Assign Service&#039;&#039;&#039; function within the application to register the interface process as a Windows service (on Windows) or configure it as a startup process on Linux/macOS.&lt;br /&gt;
* Once registered, start the service and monitor the [[Interface_Log|Interface Log]] to confirm that messages are being processed correctly.&lt;br /&gt;
&lt;br /&gt;
If you are using [[Middleware4j]] to transform files before they reach Commander4j, install and configure Middleware4j separately — see the [[Middleware4j]] wiki page for details.&lt;br /&gt;
&lt;br /&gt;
== Install Print Queues ==&lt;br /&gt;
&lt;br /&gt;
Commander4j uses two distinct methods for printing, and each requires a different type of print queue to be set up on the workstation or server.&lt;br /&gt;
&lt;br /&gt;
=== Standard Reports (JasperReports) ===&lt;br /&gt;
&lt;br /&gt;
Standard reports — such as pallet summaries, despatch notes and audit reports — are printed using JasperReports and sent to a regular operating system print queue, exactly as you would print a document from a word processor. Any printer visible to the operating system can be used. The report type is configured in the [[Modules|Modules]] screen.&lt;br /&gt;
&lt;br /&gt;
On Windows, ensure the printer is installed and visible in the Windows Printers &amp;amp; Scanners settings. On Linux, CUPS-managed queues are supported.&lt;br /&gt;
&lt;br /&gt;
=== Barcode Labels (ZPL) ===&lt;br /&gt;
&lt;br /&gt;
Barcode labels — pallet labels, case labels and sample labels — are printed by sending raw ZPL (Zebra Printer Language) commands directly to a ZPL compatible printer. This bypasses the normal print driver rendering pipeline entirely, so the label must reach the printer untouched: either through a raw / pass-through print queue, or by &#039;&#039;&#039;Direct Print&#039;&#039;&#039;, where Commander4j sends the label straight to the printer&#039;s IP address and port with no operating system queue at all. Direct Print works on every platform and is described on [[Printer Queues]].&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Windows&#039;&#039;&#039; — install the printer using the [https://www.seagullscientific.com/support/downloads/drivers/ Seagull Scientific Generic Label] driver, or configure a &#039;&#039;Generic / Text Only&#039;&#039; queue. Do not use a standard Zebra Windows driver, as this will re-interpret the ZPL rather than passing it through.&lt;br /&gt;
* &#039;&#039;&#039;macOS&#039;&#039;&#039; — a standard macOS printer queue will not work for ZPL output. On macOS 26 and earlier a raw queue can be created through the CUPS web interface, following the guidance at [https://qz.io/docs/Setting-Up-A-Raw-Printer-in-OSX qz.io]. From macOS 27 (Golden Gate) Apple has disabled the CUPS web interface, so use Direct Print instead.&lt;br /&gt;
* &#039;&#039;&#039;Linux&#039;&#039;&#039; — configure a CUPS raw queue pointing at the printer&#039;s IP address and port 9100.&lt;br /&gt;
&lt;br /&gt;
If a label is accidentally sent to a standard print queue rather than a raw queue, the printer will output pages of ZPL text commands instead of a label. This is harmless but confirms the queue type needs to be changed.&lt;br /&gt;
&lt;br /&gt;
To use Direct Print, define the printer in [[Label Printers]] with its IP address and port and &#039;&#039;&#039;Direct Print&#039;&#039;&#039; ticked, then tick &#039;&#039;&#039;Direct Print&#039;&#039;&#039; on the label&#039;s report module in [[Modules]] and make sure Group ID, Printer Type, Language and DPI agree on both. The printer then appears in the Print Queue drop-down of the label screens. See [[Printer Queues]] for the full walk-through.&lt;br /&gt;
&lt;br /&gt;
See also: [[Zebra_ZPL_Label|Zebra ZPL Label]], [[Intermec_IPL_Label|Intermec IPL Label]], [[Label_Template_Syntax|Label Template Syntax]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Printer_Queues&amp;diff=1982</id>
		<title>Printer Queues</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Printer_Queues&amp;diff=1982"/>
		<updated>2026-10-15T19:26:51Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Printer Queues&#039;&#039;&#039; explains how a Commander4j report or label reaches a printer. There are three routes, and which one you need depends on the kind of output.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Output !! Route !! Set up where&lt;br /&gt;
|-&lt;br /&gt;
| Standard reports (pallet summaries, despatch notes, audit reports) || A regular operating system print queue || The operating system&lt;br /&gt;
|-&lt;br /&gt;
| Barcode labels sent to a print queue || A &#039;&#039;&#039;raw&#039;&#039;&#039; (pass-through) print queue || The operating system&lt;br /&gt;
|-&lt;br /&gt;
| Barcode labels sent straight to the printer || A &#039;&#039;&#039;Direct Print&#039;&#039;&#039; printer, addressed by IP address and port || Commander4j, in [[Label Printers]] and [[Modules]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Standard reports ==&lt;br /&gt;
&lt;br /&gt;
These reports are produced by JasperReports and use regular print queues, exactly as you would for printing spreadsheets or letters. Any printer the operating system can see will do. The report type is defined on the [[Modules]] screen. See [[Pallet Label]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Labels through a raw print queue ==&lt;br /&gt;
&lt;br /&gt;
A label is a special kind of report. Instead of drawing a page, Commander4j sends the printer&#039;s own command language, for example ZPL (Zebra Printer Language), and the printer builds the label itself. Those commands must reach the printer untouched, so the print queue has to be a &#039;&#039;&#039;raw&#039;&#039;&#039; or pass-through queue that does not try to render the data.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Windows&#039;&#039;&#039; &amp;amp;ndash; use a driver from [https://www.seagullscientific.com/support/downloads/drivers/ Seagull Scientific] or a &#039;&#039;Generic / Text Only&#039;&#039; printer queue. Do not use a standard Zebra Windows driver, as this will re-interpret the ZPL rather than passing it through.&lt;br /&gt;
* &#039;&#039;&#039;Linux&#039;&#039;&#039; &amp;amp;ndash; create a CUPS raw queue pointing at the printer&#039;s IP address and port 9100.&lt;br /&gt;
* &#039;&#039;&#039;macOS&#039;&#039;&#039; &amp;amp;ndash; raw queues used to be created through the CUPS web interface, as described at [https://qz.io/docs/Setting-Up-A-Raw-Printer-in-OSX qz.io]. &#039;&#039;&#039;From macOS 27 (Golden Gate) Apple has disabled the CUPS web interface, so a raw queue can no longer be created this way.&#039;&#039;&#039; Use a Direct Print printer instead, as described in the next section.&lt;br /&gt;
&lt;br /&gt;
If you send a label to a regular printer queue you will typically see pages of ZPL commands, which look like a list of numbers and letters, instead of a label. This is harmless but confirms the queue type needs to be changed. If you are interested in the ZPL language, perhaps so you can create your own labels, have a look at the [https://labelary.com/viewer.html Labelary] website or the free [[ZPLRenderer|ZPL Renderer]].&lt;br /&gt;
&lt;br /&gt;
== Labels sent directly to the printer ==&lt;br /&gt;
&lt;br /&gt;
Commander4j can also send a label straight to the labeller&#039;s IP address and port, with no operating system print queue involved at all. This is called &#039;&#039;&#039;Direct Print&#039;&#039;&#039;. It works on every platform, it needs no printer driver, and it is the way to print labels on macOS 27 and later.&lt;br /&gt;
&lt;br /&gt;
Direct Print works for pallet labels and for case and tray labels alike. Two things have to be set up: the printer, and the report module that produces the label.&lt;br /&gt;
&lt;br /&gt;
=== Step 1: define the printer ===&lt;br /&gt;
&lt;br /&gt;
Open &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039; (or &#039;&#039;&#039;Tray &amp;amp; Case Labels › Setup › Label Printers&#039;&#039;&#039;, which is the same screen), press &#039;&#039;&#039;Add&#039;&#039;&#039; and give the printer an ID and a Group. Then fill in its properties:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Group ID&#039;&#039;&#039; &amp;amp;ndash; Pallet for pallet labels, Pack for case and tray labels.&lt;br /&gt;
* &#039;&#039;&#039;Printer Type&#039;&#039;&#039;, &#039;&#039;&#039;Language&#039;&#039;&#039; and &#039;&#039;&#039;DPI&#039;&#039;&#039; &amp;amp;ndash; the make, command language and resolution of the printer, for example Zebra, ZPL and 300.&lt;br /&gt;
* &#039;&#039;&#039;IP Address&#039;&#039;&#039; and &#039;&#039;&#039;Port&#039;&#039;&#039; &amp;amp;ndash; where the printer listens on the network. Port 9100 is the usual port for Zebra and most other label printers.&lt;br /&gt;
* &#039;&#039;&#039;Enabled&#039;&#039;&#039; &amp;amp;ndash; ticked.&lt;br /&gt;
* &#039;&#039;&#039;Direct Print&#039;&#039;&#039; &amp;amp;ndash; ticked. This is what tells Commander4j to send the label to the IP address itself.&lt;br /&gt;
&lt;br /&gt;
[[file:Direct_Printer.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
The example above defines a printer called PALLET_LAB1, a 300 dpi Zebra at 10.0.0.166 port 9100, in the Pallet group with Direct Print ticked. Every field is described on the [[Label Printers]] page.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: set the report module to match ===&lt;br /&gt;
&lt;br /&gt;
The label itself is produced by a report module: RPT_PALLET_LABEL for pallet labels, RPT_PACK_LABEL for case and tray labels. Open &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039;, find the module and press &#039;&#039;&#039;Edit&#039;&#039;&#039;. On the &#039;&#039;&#039;Edit the Module Properties&#039;&#039;&#039; screen:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Report Type&#039;&#039;&#039; must be &#039;&#039;&#039;Label&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Group ID&#039;&#039;&#039;, &#039;&#039;&#039;Printer Type&#039;&#039;&#039;, &#039;&#039;&#039;Language&#039;&#039;&#039; and &#039;&#039;&#039;DPI&#039;&#039;&#039; must be the same as the printer you defined in step 1.&lt;br /&gt;
* &#039;&#039;&#039;Direct Print&#039;&#039;&#039; must be ticked.&lt;br /&gt;
* &#039;&#039;&#039;Report Filename&#039;&#039;&#039; names the label template in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder, for example &amp;lt;code&amp;gt;zebra_300dpi_pallet_label_a5_npp.lbl&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[file:Direct_Module.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
=== How the two fit together ===&lt;br /&gt;
&lt;br /&gt;
A printer is only offered on a label screen when its settings agree with the module&#039;s. Group ID, Printer Type, Language, DPI and Direct Print must all match, the printer must be Enabled, and the module&#039;s Report Type must be Label. If any one of these differs the printer silently stays off the list, so this is the first place to look when a printer you expect is missing.&lt;br /&gt;
&lt;br /&gt;
[[file:Direct_Config.png|link=|900px]]&lt;br /&gt;
&lt;br /&gt;
In the picture the Printer Type, Language and DPI of the printer (left, red) must agree with the same three settings on the module (right, red), the Group ID of the printer must agree with the module&#039;s Group ID (green), and Direct Print must be ticked on both (blue).&lt;br /&gt;
&lt;br /&gt;
=== What the operator sees ===&lt;br /&gt;
&lt;br /&gt;
On the [[Pallet Label]] and [[Case Label]] screens the &#039;&#039;&#039;Print Queue&#039;&#039;&#039; drop-down lists the operating system print queues first, each with a queue icon, followed by any Direct Print printers that match the module. A Direct Print printer is shown with a different icon and as its Printer ID and Description, for example &#039;&#039;PALLET_LAB1 - Pallet Labeller 1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[file:Pallet_Print_Direct_Queue.png|link=|700px]]&lt;br /&gt;
&lt;br /&gt;
Choose the Direct Print printer and press &#039;&#039;&#039;Label&#039;&#039;&#039; as usual. The choice is remembered per workstation and per screen, so operators only pick it once. When a Direct Print printer is chosen, Commander4j writes the finished label to its &amp;lt;code&amp;gt;spool&amp;lt;/code&amp;gt; folder and a background sender delivers it to the printer&#039;s IP address and port.&lt;br /&gt;
&lt;br /&gt;
To try Direct Print without using label stock, point a printer definition at [[ZPLRenderer|ZPL Renderer]] instead of a real printer. [[Changing a Label]] walks through that from start to finish.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Printers]] &amp;amp;ndash; every field on the printer screen.&lt;br /&gt;
* [[Modules]] &amp;amp;ndash; where the report module is edited.&lt;br /&gt;
* [[Select Printer]] &amp;amp;ndash; choosing the computer&#039;s default print queue.&lt;br /&gt;
* [[Label Layouts]] &amp;amp;ndash; what is on a label and how templates work.&lt;br /&gt;
* [[Installation]] &amp;amp;ndash; server and workstation set-up, including print queues.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Pallet_Print_Direct_Queue.png&amp;diff=1981</id>
		<title>File:Pallet Print Direct Queue.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Pallet_Print_Direct_Queue.png&amp;diff=1981"/>
		<updated>2026-10-15T19:26:50Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Pallet Label screen showing a Direct Print printer in the Print Queue list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Pallet Label screen showing a Direct Print printer in the Print Queue list&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Direct_Config.png&amp;diff=1980</id>
		<title>File:Direct Config.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Direct_Config.png&amp;diff=1980"/>
		<updated>2026-10-15T19:26:48Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: How printer and module settings must match for Direct Print&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How printer and module settings must match for Direct Print&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Direct_Module.png&amp;diff=1979</id>
		<title>File:Direct Module.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Direct_Module.png&amp;diff=1979"/>
		<updated>2026-10-15T19:26:47Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Module properties for RPT_PALLET_LABEL with Direct Print ticked&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Module properties for RPT_PALLET_LABEL with Direct Print ticked&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Direct_Printer.png&amp;diff=1978</id>
		<title>File:Direct Printer.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Direct_Printer.png&amp;diff=1978"/>
		<updated>2026-10-15T19:26:45Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Label Printers screen with Direct Print ticked&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Label Printers screen with Direct Print ticked&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Changing_a_Label&amp;diff=1977</id>
		<title>Changing a Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Changing_a_Label&amp;diff=1977"/>
		<updated>2026-10-15T09:40:19Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Changing a Label&#039;&#039;&#039; walks through the smallest useful change to a pallet label: copying the standard Zebra template, altering one thing, telling Commander4j to use it, and checking the result on screen. It takes about half an hour the first time. If you have never seen a label template before, read [[Label Layouts]] first.&lt;br /&gt;
&lt;br /&gt;
The walk-through uses a Zebra printer because the free [[ZPLRenderer|ZPL Renderer]] lets you see the result without printing anything. The steps are the same for other printer makes except that you cannot preview.&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
&lt;br /&gt;
* You can log in to Commander4j with a user that has access to &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039; and &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039;.&lt;br /&gt;
* You know where Commander4j is installed. The label templates live in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder underneath it; see [[Folder Structure]].&lt;br /&gt;
* You have a plain text editor. Notepad on Windows or TextEdit on a Mac is fine. Do not use Word.&lt;br /&gt;
* Install [[ZPLRenderer|ZPL Renderer]] from the [[Downloads]] page on any PC on the same network. The Commander4j PC itself is simplest. It will act as a pretend printer so you can see each change without using label stock.&lt;br /&gt;
&lt;br /&gt;
== Step 1. Copy the standard template ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder find&lt;br /&gt;
&lt;br /&gt;
 zebra_300dpi_pallet_label_a5_standard.lbl&lt;br /&gt;
&lt;br /&gt;
and copy it to a new name, for example&lt;br /&gt;
&lt;br /&gt;
 zebra_300dpi_pallet_label_mysite.lbl&lt;br /&gt;
&lt;br /&gt;
Always work on a copy. The standard file is replaced when Commander4j is upgraded, and a copy with your own name is left alone.&lt;br /&gt;
&lt;br /&gt;
== Step 2. Make one change ==&lt;br /&gt;
&lt;br /&gt;
Open your copy in the text editor. It is a mixture of three things:&lt;br /&gt;
&lt;br /&gt;
* Lines beginning with &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; are comments. They describe the block that follows and are never sent to the printer.&lt;br /&gt;
* Zebra commands such as &amp;lt;code&amp;gt;^FO&amp;lt;/code&amp;gt; (position) and &amp;lt;code&amp;gt;^A0N,100,100&amp;lt;/code&amp;gt; (font and size). Each line draws one thing.&lt;br /&gt;
* Placeholders such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DESCRIPTION*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, which Commander4j swaps for the real value. The full list is on [[Label Fields]].&lt;br /&gt;
&lt;br /&gt;
Here are three safe changes. Pick one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change a caption.&#039;&#039;&#039; Find the line&lt;br /&gt;
&lt;br /&gt;
 ^FO900,1300^A0N,50,50^CI27^FDBEST BEFORE (MM YYYY)^FS&lt;br /&gt;
&lt;br /&gt;
The text after &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; is what prints. Change it to &amp;lt;code&amp;gt;USE BY (MM YYYY)&amp;lt;/code&amp;gt;. Leave everything before &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; alone.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change a date format.&#039;&#039;&#039; Find the line&lt;br /&gt;
&lt;br /&gt;
 ^FO1085,1360^A0N,100,100^CI27^FD&amp;lt;EXPIRYDATE(MM)&amp;gt; &amp;lt;EXPIRYDATE(yyyy)&amp;gt;^FS&lt;br /&gt;
&lt;br /&gt;
and replace the two functions with one: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;EXPIRYDATE(dd/MM/yyyy)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The caption above it should then be changed to match. The letters inside the brackets are explained in [[Label Function Syntax]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make text bigger.&#039;&#039;&#039; In &amp;lt;code&amp;gt;^A0N,100,75&amp;lt;/code&amp;gt; the two numbers are the height and width of the characters in printer dots. Increase both to make the text larger, and remember that wider text needs more room before it runs into the next field.&lt;br /&gt;
&lt;br /&gt;
Save the file as plain text with the &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; extension.&lt;br /&gt;
&lt;br /&gt;
Do not open the &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file in ZPL Renderer directly. The template contains Commander4j directives and placeholders that a renderer does not understand, so the result would be misleading. The way to check a template is to let Commander4j print it, which is what the next two steps set up.&lt;br /&gt;
&lt;br /&gt;
== Step 3. Tell Commander4j to use your file ==&lt;br /&gt;
&lt;br /&gt;
# Log in to Commander4j and open &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039;.&lt;br /&gt;
# Set the type filter to &#039;&#039;&#039;Reports&#039;&#039;&#039; and find &#039;&#039;&#039;RPT_PALLET_LABEL&#039;&#039;&#039;. Double-click it, or select it and press &#039;&#039;&#039;Edit&#039;&#039;&#039;.&lt;br /&gt;
# Set &#039;&#039;&#039;Report Type&#039;&#039;&#039; to &#039;&#039;&#039;Label&#039;&#039;&#039;. This tells Commander4j the file is a printer template rather than a standard report. Print Preview is not available for labels.&lt;br /&gt;
# In &#039;&#039;&#039;Report Filename&#039;&#039;&#039; press the &#039;&#039;&#039;...&#039;&#039;&#039; button and choose your file from the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
# Beneath Report Type are the printer settings for the label: &#039;&#039;&#039;Group ID&#039;&#039;&#039; (Pallet), &#039;&#039;&#039;Printer Type&#039;&#039;&#039; (Zebra), &#039;&#039;&#039;Language&#039;&#039;&#039; (ZPL) and &#039;&#039;&#039;DPI&#039;&#039;&#039; (300), with &#039;&#039;&#039;Direct Print&#039;&#039;&#039; on the right. These must match the printer you will choose in the next step, otherwise the printer is not offered on the Pallet Label screen.&lt;br /&gt;
# Press &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Pallet_Report2.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
If several labels are in use at your site, check [[Label Layouts#Which label file is used|which label file is used]] before editing RPT_PALLET_LABEL, because a material type, material or customer may be pointing at a different module.&lt;br /&gt;
&lt;br /&gt;
== Step 4. Print to ZPL Renderer and review ==&lt;br /&gt;
&lt;br /&gt;
This step uses ZPL Renderer as a pretend printer, so you see the label filled in with a real pallet&#039;s values without using any label stock.&lt;br /&gt;
&lt;br /&gt;
# In ZPL Renderer set the DPI to 300 and the label size to match your stock, then press the &#039;&#039;&#039;Network&#039;&#039;&#039; button. It now listens on port 9100, the same port a real Zebra printer uses.&lt;br /&gt;
# In Commander4j open &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039; and press &#039;&#039;&#039;Add&#039;&#039;&#039;. Give it an ID such as PREVIEW and choose the &#039;&#039;&#039;Pallet&#039;&#039;&#039; group.&lt;br /&gt;
# Set Printer Type to Zebra, Language to ZPL, DPI to 300, a paper size that matches your stock, the IP address of the PC running ZPL Renderer (127.0.0.1 if it is the same PC) and port 9100. Tick &#039;&#039;&#039;Enabled&#039;&#039;&#039; and &#039;&#039;&#039;Direct Print&#039;&#039;&#039;, then &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
# Open the &#039;&#039;&#039;Pallet Label&#039;&#039;&#039; screen, pick a process order, choose PREVIEW in the device drop-down and press &#039;&#039;&#039;Label&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The filled-in label appears in ZPL Renderer. Check the position, font size, spelling and the barcode text. To try another change, edit the &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file, save it and press &#039;&#039;&#039;Label&#039;&#039;&#039; again; Commander4j reads the file afresh each time.&lt;br /&gt;
&lt;br /&gt;
If PREVIEW is missing from the drop-down, compare the five settings on the printer with the ones on the module in step 3; they have to agree. See [[Label Printers]].&lt;br /&gt;
&lt;br /&gt;
Note that printing to PREVIEW still creates a pallet record and uses an SSCC number, exactly as a real print would. Use a test process order.&lt;br /&gt;
&lt;br /&gt;
== Step 5. Go live ==&lt;br /&gt;
&lt;br /&gt;
Once you are happy, choose the real printer on the Pallet Label screen instead of PREVIEW. You can leave the PREVIEW printer defined for next time, or untick &#039;&#039;&#039;Enabled&#039;&#039;&#039; so operators do not pick it by mistake.&lt;br /&gt;
&lt;br /&gt;
Keep a copy of your &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file somewhere outside the Commander4j folder. It is the only record of your label design.&lt;br /&gt;
&lt;br /&gt;
== Going further ==&lt;br /&gt;
&lt;br /&gt;
* To add a value that is not on the standard label, find its name on [[Label Fields]], copy an existing text line and change the position and placeholder.&lt;br /&gt;
* To change what is encoded in a barcode, read the DEFINE BARCODE section of [[Label Template Syntax]] first. The GS1 rules are strict and a customer&#039;s scanner will reject a barcode that breaks them.&lt;br /&gt;
* [[Zebra ZPL Label]] explains the standard template block by block.&lt;br /&gt;
* The [https://support.zebra.com/cpws/docs/zpl/zpl-zbi2-pm-en.pdf Zebra ZPL Programming Guide] describes every command.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Changing_a_Label&amp;diff=1976</id>
		<title>Changing a Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Changing_a_Label&amp;diff=1976"/>
		<updated>2026-10-15T09:36:33Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Changing a Label&#039;&#039;&#039; walks through the smallest useful change to a pallet label: copying the standard Zebra template, altering one thing, checking it on screen, and telling Commander4j to use it. It takes about half an hour the first time. If you have never seen a label template before, read [[Label Layouts]] first.&lt;br /&gt;
&lt;br /&gt;
The walk-through uses a Zebra printer because the free [[ZPLRenderer|ZPL Renderer]] lets you see the result without printing anything. The steps are the same for other printer makes except that you cannot preview.&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
&lt;br /&gt;
* You can log in to Commander4j with a user that has access to &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039; and &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039;.&lt;br /&gt;
* You know where Commander4j is installed. The label templates live in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder underneath it; see [[Folder Structure]].&lt;br /&gt;
* You have a plain text editor. Notepad on Windows or TextEdit on a Mac is fine. Do not use Word.&lt;br /&gt;
* For the preview step, install [[ZPLRenderer|ZPL Renderer]] from the [[Downloads]] page on any PC on the same network. The Commander4j PC itself is simplest.&lt;br /&gt;
&lt;br /&gt;
== Step 1. Copy the standard template ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder find&lt;br /&gt;
&lt;br /&gt;
 zebra_300dpi_pallet_label_a5_standard.lbl&lt;br /&gt;
&lt;br /&gt;
and copy it to a new name, for example&lt;br /&gt;
&lt;br /&gt;
 zebra_300dpi_pallet_label_mysite.lbl&lt;br /&gt;
&lt;br /&gt;
Always work on a copy. The standard file is replaced when Commander4j is upgraded, and a copy with your own name is left alone.&lt;br /&gt;
&lt;br /&gt;
== Step 2. Make one change ==&lt;br /&gt;
&lt;br /&gt;
Open your copy in the text editor. It is a mixture of three things:&lt;br /&gt;
&lt;br /&gt;
* Lines beginning with &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; are comments. They describe the block that follows and are never sent to the printer.&lt;br /&gt;
* Zebra commands such as &amp;lt;code&amp;gt;^FO&amp;lt;/code&amp;gt; (position) and &amp;lt;code&amp;gt;^A0N,100,100&amp;lt;/code&amp;gt; (font and size). Each line draws one thing.&lt;br /&gt;
* Placeholders such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DESCRIPTION*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, which Commander4j swaps for the real value. The full list is on [[Label Fields]].&lt;br /&gt;
&lt;br /&gt;
Here are three safe changes. Pick one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change a caption.&#039;&#039;&#039; Find the line&lt;br /&gt;
&lt;br /&gt;
 ^FO900,1300^A0N,50,50^CI27^FDBEST BEFORE (MM YYYY)^FS&lt;br /&gt;
&lt;br /&gt;
The text after &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; is what prints. Change it to &amp;lt;code&amp;gt;USE BY (MM YYYY)&amp;lt;/code&amp;gt;. Leave everything before &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; alone.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change a date format.&#039;&#039;&#039; Find the line&lt;br /&gt;
&lt;br /&gt;
 ^FO1085,1360^A0N,100,100^CI27^FD&amp;lt;EXPIRYDATE(MM)&amp;gt; &amp;lt;EXPIRYDATE(yyyy)&amp;gt;^FS&lt;br /&gt;
&lt;br /&gt;
and replace the two functions with one: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;EXPIRYDATE(dd/MM/yyyy)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The caption above it should then be changed to match. The letters inside the brackets are explained in [[Label Function Syntax]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make text bigger.&#039;&#039;&#039; In &amp;lt;code&amp;gt;^A0N,100,75&amp;lt;/code&amp;gt; the two numbers are the height and width of the characters in printer dots. Increase both to make the text larger, and remember that wider text needs more room before it runs into the next field.&lt;br /&gt;
&lt;br /&gt;
Save the file as plain text with the &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; extension.&lt;br /&gt;
&lt;br /&gt;
== Step 3. Check the layout on screen ==&lt;br /&gt;
&lt;br /&gt;
Open [[ZPLRenderer|ZPL Renderer]], set the DPI to 300 and the label size to match your stock, and open your &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file with the &#039;&#039;&#039;Open&#039;&#039;&#039; button. You will see the label with the placeholder names printed where the values will go, and the barcodes will not be meaningful because they have not yet been filled in. That is expected. This check is for position, font size and spelling only.&lt;br /&gt;
&lt;br /&gt;
Edit the file, save it, and press &#039;&#039;&#039;Refresh&#039;&#039;&#039; in ZPL Renderer to see the change.&lt;br /&gt;
&lt;br /&gt;
== Step 4. Tell Commander4j to use your file ==&lt;br /&gt;
&lt;br /&gt;
# Log in to Commander4j and open &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039;.&lt;br /&gt;
# Set the type filter to &#039;&#039;&#039;Reports&#039;&#039;&#039; and find &#039;&#039;&#039;RPT_PALLET_LABEL&#039;&#039;&#039;. Double-click it, or select it and press &#039;&#039;&#039;Edit&#039;&#039;&#039;.&lt;br /&gt;
# Set &#039;&#039;&#039;Report Type&#039;&#039;&#039; to &#039;&#039;&#039;Label&#039;&#039;&#039;. This tells Commander4j the file is a printer template rather than a standard report. Print Preview is not available for labels.&lt;br /&gt;
# In &#039;&#039;&#039;Report Filename&#039;&#039;&#039; press the &#039;&#039;&#039;...&#039;&#039;&#039; button and choose your file from the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
# Beneath Report Type are the printer settings for the label: &#039;&#039;&#039;Group ID&#039;&#039;&#039; (Pallet), &#039;&#039;&#039;Printer Type&#039;&#039;&#039; (Zebra), &#039;&#039;&#039;Language&#039;&#039;&#039; (ZPL) and &#039;&#039;&#039;DPI&#039;&#039;&#039; (300), with &#039;&#039;&#039;Direct Print&#039;&#039;&#039; on the right. These must match the printer you will choose in the next step, otherwise the printer is not offered on the Pallet Label screen.&lt;br /&gt;
# Press &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Pallet_Report2.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
If several labels are in use at your site, check [[Label Layouts#Which label file is used|which label file is used]] before editing RPT_PALLET_LABEL, because a material type, material or customer may be pointing at a different module.&lt;br /&gt;
&lt;br /&gt;
== Step 5. Print with real data to the screen ==&lt;br /&gt;
&lt;br /&gt;
This step uses ZPL Renderer as a pretend printer, so you see the label filled in with a real pallet&#039;s values without using any label stock.&lt;br /&gt;
&lt;br /&gt;
# In ZPL Renderer press the &#039;&#039;&#039;Network&#039;&#039;&#039; button. It now listens on port 9100, the same port a real Zebra printer uses.&lt;br /&gt;
# In Commander4j open &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039; and press &#039;&#039;&#039;Add&#039;&#039;&#039;. Give it an ID such as PREVIEW and choose the &#039;&#039;&#039;Pallet&#039;&#039;&#039; group.&lt;br /&gt;
# Set Printer Type to Zebra, Language to ZPL, DPI to 300, a paper size that matches your stock, the IP address of the PC running ZPL Renderer (127.0.0.1 if it is the same PC) and port 9100. Tick &#039;&#039;&#039;Enabled&#039;&#039;&#039; and &#039;&#039;&#039;Direct Print&#039;&#039;&#039;, then &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
# Open the &#039;&#039;&#039;Pallet Label&#039;&#039;&#039; screen, pick a process order, choose PREVIEW in the device drop-down and press &#039;&#039;&#039;Label&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The filled-in label appears in ZPL Renderer. If PREVIEW is missing from the drop-down, compare the five settings on the printer with the ones on the module in step 4; they have to agree. See [[Label Printers]].&lt;br /&gt;
&lt;br /&gt;
Note that printing to PREVIEW still creates a pallet record and uses an SSCC number, exactly as a real print would. Use a test process order.&lt;br /&gt;
&lt;br /&gt;
== Step 6. Go live ==&lt;br /&gt;
&lt;br /&gt;
Once you are happy, choose the real printer on the Pallet Label screen instead of PREVIEW. You can leave the PREVIEW printer defined for next time, or untick &#039;&#039;&#039;Enabled&#039;&#039;&#039; so operators do not pick it by mistake.&lt;br /&gt;
&lt;br /&gt;
Keep a copy of your &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file somewhere outside the Commander4j folder. It is the only record of your label design.&lt;br /&gt;
&lt;br /&gt;
== Going further ==&lt;br /&gt;
&lt;br /&gt;
* To add a value that is not on the standard label, find its name on [[Label Fields]], copy an existing text line and change the position and placeholder.&lt;br /&gt;
* To change what is encoded in a barcode, read the DEFINE BARCODE section of [[Label Template Syntax]] first. The GS1 rules are strict and a customer&#039;s scanner will reject a barcode that breaks them.&lt;br /&gt;
* [[Zebra ZPL Label]] explains the standard template block by block.&lt;br /&gt;
* The [https://support.zebra.com/cpws/docs/zpl/zpl-zbi2-pm-en.pdf Zebra ZPL Programming Guide] describes every command.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=File:Module_Pallet_Report2.png&amp;diff=1975</id>
		<title>File:Module Pallet Report2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=File:Module_Pallet_Report2.png&amp;diff=1975"/>
		<updated>2026-10-15T09:36:32Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Dgarratt uploaded a new version of File:Module Pallet Report2.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Template_Syntax&amp;diff=1974</id>
		<title>Label Template Syntax</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Template_Syntax&amp;diff=1974"/>
		<updated>2026-10-15T09:26:40Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Label Template Syntax&#039;&#039;&#039; describes how a label template file is put together. A template is the file that Commander4j, and [[AutoLab4j]], send to a barcode printer after filling in the values for a pallet or case. If you only want to make a small change to an existing label, [[Changing a Label]] is a gentler starting point; this page is the reference behind it.&lt;br /&gt;
&lt;br /&gt;
== The idea in one paragraph ==&lt;br /&gt;
&lt;br /&gt;
A label template is a plain text file in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder. Most of it is written in the printer&#039;s own language, ZPL for Zebra or IPL for Intermec, exactly as you would find in the printer&#039;s programming guide. Wherever a value should change from one pallet to the next, the template contains a placeholder instead of a fixed value. When a label is printed, Commander4j reads the template, swaps every placeholder for the real value, works out the barcode code-set switching, and sends the result to the printer as one stream of text. The printer never sees the placeholders.&lt;br /&gt;
&lt;br /&gt;
Two worked examples are on this wiki: [[Zebra ZPL Label]] and [[Intermec IPL Label]].&lt;br /&gt;
&lt;br /&gt;
== What a template contains ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Kind of line !! Looks like !! What happens to it&lt;br /&gt;
|-&lt;br /&gt;
| Comment || &amp;lt;code&amp;gt;/* Product description */&amp;lt;/code&amp;gt; || Any line that starts with &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; is dropped before the label is sent. Use comments to label each block. Putting &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; at the start of a printer command is a handy way to switch that line off without deleting it.&lt;br /&gt;
|-&lt;br /&gt;
| Printer command || &amp;lt;code&amp;gt;^FO80,1070^A0N,50,50^FDDESCRIPTION^FS&amp;lt;/code&amp;gt; || Sent to the printer unchanged, apart from placeholders and functions inside it.&lt;br /&gt;
|-&lt;br /&gt;
| Placeholder || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DESCRIPTION*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Replaced by the value of that field. The available names are listed on [[Label Fields]].&lt;br /&gt;
|-&lt;br /&gt;
| Function || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Formats a value before it is printed. Functions can be nested; the innermost runs first. See [[Label Function Syntax]].&lt;br /&gt;
|-&lt;br /&gt;
| Directive || &amp;lt;code&amp;gt;DEFINE BARCODE BARCODE2 00&amp;lt;nowiki&amp;gt;&amp;lt;*SSCC*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || An instruction to Commander4j itself. Directives are read and removed; they are never sent to the printer. They are described below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Blank lines are ignored and leading spaces are trimmed, so the file can be laid out for readability.&lt;br /&gt;
&lt;br /&gt;
== Placeholders ==&lt;br /&gt;
&lt;br /&gt;
A placeholder is a field name between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;*SSCC*&amp;gt;  &amp;lt;*QUANTITY*&amp;gt;  &amp;lt;*DESCRIPTION*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dates and numbers accept a format after a &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; character:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;*DATE_OF_MANUFACTURE^dd/MM/yyyy*&amp;gt;&lt;br /&gt;
 &amp;lt;*QUANTITY^000000*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without a format a date prints as yyyy-MM-dd and a number is padded to four digits. The format is ignored for text fields.&lt;br /&gt;
&lt;br /&gt;
Three rules worth knowing:&lt;br /&gt;
&lt;br /&gt;
* A placeholder whose name is not available on this screen prints the name followed by &#039;&#039;&#039;not found!&#039;&#039;&#039; so the mistake is visible on the label.&lt;br /&gt;
* Round brackets inside a text value are printed as curly braces, because round brackets have a meaning in function syntax.&lt;br /&gt;
* Names defined with DEFINE BARCODE take precedence over database fields of the same name.&lt;br /&gt;
&lt;br /&gt;
== Directives ==&lt;br /&gt;
&lt;br /&gt;
Directives are lines that Commander4j acts on and removes. They are normally placed at the top of the file. A directive must be the first thing on its line.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Directive !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DEFINE BARCODE name value&amp;lt;/code&amp;gt; || Creates a barcode variable. Explained in detail below.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DEFINE BARCODE COUNT_MODE ZPL&amp;lt;/code&amp;gt; || Tells Commander4j to send the label once and let the printer make the copies. Pair it with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;^PQ&amp;lt;*ZPL_LABEL_COUNT*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in the template, which prints the number of copies the operator asked for. Without this directive Commander4j sends the whole label once per copy and ZPL_LABEL_COUNT is always 1.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SUPPRESS EOL&amp;lt;/code&amp;gt; || Joins all the lines together with no line endings. Needed by some printer languages.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SUPPRESS UNICODE&amp;lt;/code&amp;gt; || Stops accented and other non-ASCII characters being converted to the &amp;lt;code&amp;gt;_XX&amp;lt;/code&amp;gt; hex escape form that Zebra printers read after &amp;lt;code&amp;gt;^FH&amp;lt;/code&amp;gt;. Use it only for printers that do not use this escape form.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SUPPRESS ASCII ENCODE&amp;lt;/code&amp;gt; || Normally the control-character names &amp;lt;code&amp;gt;&amp;amp;lt;STX&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;ETX&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;ESC&amp;amp;gt;&amp;lt;/code&amp;gt; and so on are translated into the real control characters before the label is sent. With this directive they are sent to the device exactly as written. When writing a template for a non-Zebra printer, copy the directives from the shipped template for that printer make rather than working them out from scratch.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DEFINE BARCODE in detail ==&lt;br /&gt;
&lt;br /&gt;
This is the part of a template that needs the most care, and it only matters when you are changing what is encoded in a barcode. For a caption or date change you can leave it alone.&lt;br /&gt;
&lt;br /&gt;
DEFINE BARCODE BARCODE1   02&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;20&amp;lt;PADLEFT(&amp;lt;*VARIANT*&amp;gt;,2,0)&amp;gt;15&amp;lt;EXPIRYDATE(yy)&amp;gt;&amp;lt;EXPIRYDATE(MM)&amp;gt;&amp;lt;EXPIRYDATE(dd)&amp;gt;37&amp;lt;*QUANTITY^0000*&amp;gt;^10&amp;lt;*BATCH_NUMBER*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line is used to create a barcode variable. You may wonder why you cannot use the same string to print the label and skip this step. The reason that using the Zebra ZPL language, when encoding in the Code 128 barcode symbology you need to determine what type of data is in the barcode. Numeric data can be compressed when it appears in pairs (even number) of characters. Alphabetic characters have to use a different encoding.&lt;br /&gt;
&lt;br /&gt;
So - the purpose of the DEFINE BARCODE directive it to let Commander4j look at the complete barcode string in advance and insert the appropriate commands to switch Code Sets before the data is sent to the barcode printer.&lt;br /&gt;
&lt;br /&gt;
The Printer Commands which are used to switch between modes are also defined below.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE BARCODE2   00&amp;lt;*SSCC*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is another example of a barcode variable.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE FNC1       &amp;gt;8&lt;br /&gt;
&lt;br /&gt;
FNC1 is required only at the end of variable length data section. It is not required as the last character in the bar code.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE CODEA      &amp;gt;9&lt;br /&gt;
&lt;br /&gt;
Subset A supports numbers, upper-case letters, and control characters, such as tab and new-line&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE CODEB      &amp;gt;6&lt;br /&gt;
&lt;br /&gt;
Subset B supports numbers, upper- and lower-case letters and some additional characters.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE CODEC      &amp;gt;;&lt;br /&gt;
&lt;br /&gt;
Subset C supports numbers only. It must have an even number of digits.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE END        *END*&lt;br /&gt;
&lt;br /&gt;
This is used to indicate the end of the DEFINE section of the label.&lt;br /&gt;
&lt;br /&gt;
Because a DEFINE BARCODE line is split on spaces, the value must not contain a space.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Layouts]]&lt;br /&gt;
* [[Changing a Label]]&lt;br /&gt;
* [[Label Fields]]&lt;br /&gt;
* [[Label Function Syntax]]&lt;br /&gt;
* [[Zebra ZPL Label]]&lt;br /&gt;
* [[Intermec IPL Label]]&lt;br /&gt;
* [[Useful Information]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Layouts&amp;diff=1973</id>
		<title>Label Layouts</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Layouts&amp;diff=1973"/>
		<updated>2026-10-15T09:08:29Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:900px; padding:0.9em 1.2em; margin:0 0 1em 0; border:1px solid #c8d1e0; border-left:5px solid #1e40c8; border-radius:0 8px 8px 0; background:#f4f6fb;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;This page is the starting point for anyone who wants to know what is printed on a Commander4j label, or who needs to change it.&#039;&#039;&#039; You do not need to be a programmer to read it. Where a change does need technical help, the page says so.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What a pallet label looks like ==&lt;br /&gt;
&lt;br /&gt;
Every pallet that Commander4j records gets a label like the ones below. The left-hand label was printed on a Zebra printer, the right-hand one on an Intermec printer. Both carry the same information in the layout the [https://www.gs1.org/standards/barcodes/sscc GS1] standard expects, so a customer&#039;s warehouse can scan it on arrival.&lt;br /&gt;
&lt;br /&gt;
[[file:Zebra_Intermec_Pallet.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! What you see !! What it means !! Where the value comes from&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;My Company&#039;&#039;&#039; || Your company or customer name. || The [[Customers]] record attached to the process order.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;L1&#039;&#039;&#039; || Label number. When two labels are printed per pallet the second one says L2. || Counted automatically as labels are printed.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MATERIAL&#039;&#039;&#039; || Your product code. || [[Materials]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Your Label Header Text&#039;&#039;&#039; || An optional line of free text, the same on every label. || The &#039;&#039;&#039;LABEL_HEADER_COMMENT&#039;&#039;&#039; setting in [[System Keys]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SSCC&#039;&#039;&#039; || The 18-digit Serial Shipping Container Code. This number is unique to the pallet and is what the customer scans. || Generated by Commander4j from the number range in [[System Keys]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;CONTENT&#039;&#039;&#039; || The GTIN (EAN) of the case or unit on the pallet. || The unit of measure on the [[Materials]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;VARIANT&#039;&#039;&#039; || Two-digit GS1 variant for the case. || [[Materials]] unit of measure.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;COUNT&#039;&#039;&#039; || How many cases are on the pallet. || Entered on the [[Pallet Label]] screen, defaulting to a full pallet.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;LAYERS&#039;&#039;&#039; || How many layers of cases. || Calculated from the pallet quantity and the per-layer unit of measure on the [[Materials]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;DESCRIPTION&#039;&#039;&#039; || Product description. || [[Materials]].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;BATCH/LOT&#039;&#039;&#039; || The batch number. || Built from the batch format in [[System Keys]], or overridden on the [[Customers]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;BEST BEFORE&#039;&#039;&#039; || The expiry date. || Date of manufacture plus the shelf life held on the [[Materials]] record.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Top barcode&#039;&#039;&#039; || A GS1-128 barcode containing the content (02), variant (20), best before (15), count (37) and batch (10). || Built from the values above.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Bottom barcode&#039;&#039;&#039; || A GS1-128 barcode containing only the SSCC (00). || The pallet number.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Case and tray labels work the same way but carry no SSCC. See [[Case Label]].&lt;br /&gt;
&lt;br /&gt;
== How a label gets from the screen to the printer ==&lt;br /&gt;
&lt;br /&gt;
There are three ways Commander4j can produce a label, and which one you use decides how the label is designed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Route !! Designed with !! Best for !! Preview on screen?&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Standard report&#039;&#039;&#039; || [https://community.jaspersoft.com/download-jaspersoft/community-edition/ JasperSoft Studio], a free visual report designer. The label is a &amp;lt;code&amp;gt;.jrxml&amp;lt;/code&amp;gt; file in the &amp;lt;code&amp;gt;reports&amp;lt;/code&amp;gt; folder. || Any printer that has a normal Windows or Mac print queue, including office laser printers. This is how a fresh install is set up. || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Label template&#039;&#039;&#039; || A text file in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder, written in the printer&#039;s own command language with Commander4j placeholders for the values. || Industrial barcode printers (Zebra, Intermec, Printronix). Faster, and the barcodes are sharper. || No. Use [[ZPLRenderer|ZPL Renderer]] instead.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;External labeller&#039;&#039;&#039; || [[AutoLab4j]] prints the same template file on an automatic print-and-apply machine on the line. [[LabelServer4j]] drives case and secondary labellers from its own copy of the label files, kept in its own folders. || Lines where the labeller fires itself when a pallet or case is complete. || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Most sites start with the standard report and move to a label template when they install a barcode printer. The rest of this page is about label templates.&lt;br /&gt;
&lt;br /&gt;
== Which label file is used ==&lt;br /&gt;
&lt;br /&gt;
Commander4j decides which label to print in this order, and the last match wins:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;DEFAULT_PALLET_REPORT&#039;&#039;&#039; setting in [[System Keys]] (the module &#039;&#039;&#039;RPT_PALLET_LABEL&#039;&#039;&#039; after installation). Case labels use &#039;&#039;&#039;DEFAULT_PACK_REPORT&#039;&#039;&#039;.&lt;br /&gt;
# An override on the [[Material Types|Material Type]].&lt;br /&gt;
# If the material type has no override, an override on the [[Materials|Material]] itself.&lt;br /&gt;
# An override on the [[Customers|Customer]] attached to the process order.&lt;br /&gt;
&lt;br /&gt;
A module record in the [[Modules]] screen links a name such as RPT_PALLET_LABEL to a file, and says whether that file is a standard report or a label template. That is the screen you change when you want Commander4j to use a different label. [[Changing a Label]] walks through it.&lt;br /&gt;
&lt;br /&gt;
== Which printer language do I have? ==&lt;br /&gt;
&lt;br /&gt;
Label templates are written in the language the printer understands. Look at the make of your printer:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Printer make !! Language !! Example template on this wiki !! Preview tool&lt;br /&gt;
|-&lt;br /&gt;
| Zebra || ZPL || [[Zebra ZPL Label]] || [[ZPLRenderer|ZPL Renderer]] or [https://labelary.com/viewer.html Labelary]&lt;br /&gt;
|-&lt;br /&gt;
| Intermec / Honeywell || IPL || [[Intermec IPL Label]] || none&lt;br /&gt;
|-&lt;br /&gt;
| Printronix || IGP/PGL || shipped in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder || none&lt;br /&gt;
|-&lt;br /&gt;
| Logopak || LEAP || usually driven by [[LabelServer4j]] from its own label files; can also be defined as a direct printer in [[Label Printers]] || [[LogoRenderer]]&lt;br /&gt;
|-&lt;br /&gt;
| Videojet || Zipher || usually driven by [[LabelServer4j]]; can also be defined as a direct printer in [[Label Printers]] || none&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you are buying a printer and have a free choice, Zebra is the easiest to work with because the free ZPL Renderer shows you the label on screen without printing anything.&lt;br /&gt;
&lt;br /&gt;
== How hard is the change you want to make? ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Change !! Difficulty !! What you need !! Start here&lt;br /&gt;
|-&lt;br /&gt;
| Change a caption, a date format, or the company name. Move a field a little. Make text bigger or smaller. || &#039;&#039;&#039;Easy.&#039;&#039;&#039; Half an hour with a text editor. || A copy of the existing template and the list of placeholders. || [[Changing a Label]]&lt;br /&gt;
|-&lt;br /&gt;
| Add a value that is already in Commander4j to the label, for example the customer&#039;s part number. || &#039;&#039;&#039;Moderate.&#039;&#039;&#039; You need to find the right placeholder and a free space on the label. || [[Label Fields]] and a preview tool. || [[Label Fields]], then [[Changing a Label]]&lt;br /&gt;
|-&lt;br /&gt;
| Change what goes into a barcode, add a new barcode, or design a label from a blank sheet. || &#039;&#039;&#039;Technical.&#039;&#039;&#039; Needs knowledge of the printer language and of the GS1 barcode rules. || The printer&#039;s programming guide and [[Label Template Syntax]]. || [[Label Template Syntax]] and [[Useful Information]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you are on a support contract, the technical changes are the kind of thing to ask for. The easy and moderate ones are well within reach of a line supervisor or IT generalist.&lt;br /&gt;
&lt;br /&gt;
== Pages in this section ==&lt;br /&gt;
&lt;br /&gt;
* [[Changing a Label]] &amp;amp;ndash; a step-by-step walk-through of copying a template, changing one thing, previewing it and switching Commander4j over to it.&lt;br /&gt;
* [[Label Fields]] &amp;amp;ndash; every placeholder you can put on a label, with what it prints.&lt;br /&gt;
* [[Label Template Syntax]] &amp;amp;ndash; how a template file is put together.&lt;br /&gt;
* [[Label Function Syntax]] &amp;amp;ndash; the functions for formatting dates, padding numbers and trimming text.&lt;br /&gt;
* [[Zebra ZPL Label]] &amp;amp;ndash; the standard pallet label, explained block by block.&lt;br /&gt;
* [[Intermec IPL Label]] &amp;amp;ndash; the same label for an Intermec printer.&lt;br /&gt;
* [[Label Printers]] &amp;amp;ndash; defining network barcode printers.&lt;br /&gt;
* [[Printer Queues]] &amp;amp;ndash; why a label template needs a raw print queue.&lt;br /&gt;
* [[ZPLRenderer|ZPL Renderer]] &amp;amp;ndash; see a Zebra label on screen without a printer.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Fields&amp;diff=1972</id>
		<title>Label Fields</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Fields&amp;diff=1972"/>
		<updated>2026-10-15T09:08:28Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Label Fields&#039;&#039;&#039; lists every value you can place on a label template. This is the page to open when you want to add something to a label and need to know what it is called.&lt;br /&gt;
&lt;br /&gt;
A value is placed on the label by writing its name between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. When the label is printed, Commander4j replaces the placeholder with the real value for that pallet or case.&lt;br /&gt;
&lt;br /&gt;
 ^FD&amp;lt;*DESCRIPTION*&amp;gt;^FS&lt;br /&gt;
&lt;br /&gt;
prints the product description. Names are written in capitals exactly as listed below. See [[Label Template Syntax]] for how a whole template is put together and [[Label Function Syntax]] for ways to format a value before it is printed.&lt;br /&gt;
&lt;br /&gt;
Which names are available depends on which screen prints the label, because each screen reads a different set of data. The tables below are split the same way. If a name is used that is not available, the label prints the name followed by &#039;&#039;&#039;not found!&#039;&#039;&#039; in its place, so a mistake is visible on paper rather than silent.&lt;br /&gt;
&lt;br /&gt;
== Pallet labels ==&lt;br /&gt;
&lt;br /&gt;
These fields are available on labels printed from the [[Pallet Label]] screen and from the other pallet screens that can print a label: [[Production Declaration]], [[Pallet Issue]], [[Pallet Return]], [[Split Pallet]] and the pallet label re-print dialog. The values are read from the pallet record together with its material, batch and customer.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! What it prints&lt;br /&gt;
|-&lt;br /&gt;
| SSCC || text || The 18-digit pallet number.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL || text || Product code.&lt;br /&gt;
|-&lt;br /&gt;
| DESCRIPTION || text || Product description from [[Materials]].&lt;br /&gt;
|-&lt;br /&gt;
| OLD_MATERIAL || text || The previous product code held on the material, if you use one.&lt;br /&gt;
|-&lt;br /&gt;
| EAN || text || GTIN of the unit on the pallet. Usually wrapped in PADLEFT to make it 14 digits: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| VARIANT || text || GS1 variant of the unit on the pallet, usually padded to 2 digits.&lt;br /&gt;
|-&lt;br /&gt;
| QUANTITY || number || Number of units on the pallet. Printed as a whole number padded to 4 digits unless a format is given, for example &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY^0*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for no padding.&lt;br /&gt;
|-&lt;br /&gt;
| UOM || text || Unit of measure for QUANTITY.&lt;br /&gt;
|-&lt;br /&gt;
| LAYERS || number || Number of layers on the pallet.&lt;br /&gt;
|-&lt;br /&gt;
| BATCH_NUMBER || text || Batch or lot number.&lt;br /&gt;
|-&lt;br /&gt;
| PROCESS_ORDER || text || Process order number.&lt;br /&gt;
|-&lt;br /&gt;
| REQUIRED_RESOURCE || text || Production line or resource from the process order.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_OF_MANUFACTURE || date || Date of manufacture. Prefer the [[Label Function Syntax#PRODDATE|PRODDATE]] function, which formats it for you.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_DATE || date || Expiry date held against the batch. Prefer the [[Label Function Syntax#EXPIRYDATE|EXPIRYDATE]] function, which picks the batch or pallet date according to the &#039;&#039;&#039;EXPIRY DATE MODE&#039;&#039;&#039; setting.&lt;br /&gt;
|-&lt;br /&gt;
| SSCC_EXPIRY_DATE || date || Expiry date held against the pallet. Only populated when EXPIRY DATE MODE is SSCC.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_CREATED || date and time || When the pallet record was created. Prefer the [[Label Function Syntax#DATE_CREATED|DATE_CREATED]] function.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_UPDATED || date and time || When the pallet record was last changed.&lt;br /&gt;
|-&lt;br /&gt;
| CREATED_BY_USER_ID, UPDATED_BY_USER_ID || text || Who created or last changed the pallet record.&lt;br /&gt;
|-&lt;br /&gt;
| CUSTOMER_ID || text || Customer code from the process order.&lt;br /&gt;
|-&lt;br /&gt;
| CUSTOMER_NAME || text || Customer name from [[Customers]].&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_ON_LABEL || text || The customer&#039;s print-on-label flag from [[Customers]].&lt;br /&gt;
|-&lt;br /&gt;
| LOCATION_ID || text || Where the pallet currently is.&lt;br /&gt;
|-&lt;br /&gt;
| STATUS || text || Pallet status.&lt;br /&gt;
|-&lt;br /&gt;
| CONFIRMED || text || Y once the pallet has been confirmed, otherwise N.&lt;br /&gt;
|-&lt;br /&gt;
| DESPATCH_NO || text || Despatch number, blank until the pallet is despatched.&lt;br /&gt;
|-&lt;br /&gt;
| MHN_NUMBER, DECISION || text || Master hold notice number and quality decision, if the pallet is on hold.&lt;br /&gt;
|-&lt;br /&gt;
| EQUIPMENT_TYPE || text || The pallet or equipment type.&lt;br /&gt;
|-&lt;br /&gt;
| GROSS_WEIGHT, NET_WEIGHT, WEIGHT_UOM || number, number, text || Weights held on the material record. For the total pallet weight use the [[Label Function Syntax#PALLET_WEIGHT_TEXT|PALLET_WEIGHT_TEXT]] function.&lt;br /&gt;
|-&lt;br /&gt;
| PART_NO || text || The customer&#039;s part number for this material, from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| CASE_CONTENT || text || Free text describing the case contents, from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| ALT_TEXT_1 || text || Spare free text for this material and customer, from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| BASE_EAN, BASE_VARIANT || text || GTIN and variant of the base unit of the material.&lt;br /&gt;
|-&lt;br /&gt;
| BASE_UOM || text || The base unit of measure.&lt;br /&gt;
|-&lt;br /&gt;
| BASE_QUANTITY || number || Pallet quantity converted into base units.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Case and tray labels ==&lt;br /&gt;
&lt;br /&gt;
These fields are available on labels printed from the [[Case Label]] screen. Note that several names differ from the pallet list: the GTIN is &#039;&#039;&#039;PROD_EAN&#039;&#039;&#039; here rather than EAN, the description is &#039;&#039;&#039;MATERIAL_DESCRIPTION&#039;&#039;&#039;, and there is no SSCC or LAYERS. A pallet template used as a case label prints &amp;quot;not found!&amp;quot; for those.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! What it prints&lt;br /&gt;
|-&lt;br /&gt;
| UNIQUE_ID || text || Internal identifier for this print request.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL || text || Product code.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL_DESCRIPTION || text || Product description.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL_TYPE || text || Material type code.&lt;br /&gt;
|-&lt;br /&gt;
| PROD_EAN, PROD_VARIANT || text || GTIN and variant of the unit being labelled.&lt;br /&gt;
|-&lt;br /&gt;
| PROD_QUANTITY || number || Quantity being labelled.&lt;br /&gt;
|-&lt;br /&gt;
| PROD_UOM || text || Unit of measure for PROD_QUANTITY.&lt;br /&gt;
|-&lt;br /&gt;
| BASE_EAN, BASE_VARIANT, BASE_QUANTITY, BASE_UOM || mixed || The same values for the base unit.&lt;br /&gt;
|-&lt;br /&gt;
| BATCH_NUMBER || text || Batch number as printed.&lt;br /&gt;
|-&lt;br /&gt;
| BATCH_PREFIX, BATCH_SUFFIX || text || The parts added to the batch number, when used.&lt;br /&gt;
|-&lt;br /&gt;
| OVERRIDE_BATCH_PREFIX, OVERRIDE_MANUFACTURE_DATE, OVERRIDE_EXPIRY_DATE || text || Y when the operator overrode the default, otherwise N.&lt;br /&gt;
|-&lt;br /&gt;
| PROCESS_ORDER || text || Process order number.&lt;br /&gt;
|-&lt;br /&gt;
| REQUIRED_RESOURCE || text || Production line or resource.&lt;br /&gt;
|-&lt;br /&gt;
| LINE || text || The production line chosen on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| LOCATION_ID || text || Location from the process order.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_OF_MANUFACTURE || date || Date of manufacture. Add a format, for example &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DATE_OF_MANUFACTURE^dd/MM/yyyy*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_DATE || date || Expiry date. Add a format in the same way.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_MODE || text || BATCH or SSCC.&lt;br /&gt;
|-&lt;br /&gt;
| CUSTOMER_ID, CUSTOMER_NAME || text || Customer code and name.&lt;br /&gt;
|-&lt;br /&gt;
| PART_NO, ALT_TEXT_1 || text || Customer-specific text from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| LABEL_TYPE || text || Pack or Pallet.&lt;br /&gt;
|-&lt;br /&gt;
| MODULE_ID || text || The report module that produced the label.&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_DATE || date and time || When the label was requested.&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_COPIES || number || Number of copies requested.&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_QUEUE_NAME || text || The queue or printer chosen.&lt;br /&gt;
|-&lt;br /&gt;
| USER_ID, WORKSTATION_ID || text || Who printed it and from which PC.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Labels printed by the [[Quality Control Sample]] screen use their own, smaller set of fields and are not covered here.&lt;br /&gt;
&lt;br /&gt;
== Fields that are always available ==&lt;br /&gt;
&lt;br /&gt;
These are added by Commander4j for every label template, whichever screen prints it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! What it prints&lt;br /&gt;
|-&lt;br /&gt;
| LABEL_NO || The copy number, 1 for the first label of a pallet, 2 for the second and so on. The standard label prints it as L1, L2.&lt;br /&gt;
|-&lt;br /&gt;
| HEADER_COMMENT || The text of the &#039;&#039;&#039;LABEL_HEADER_COMMENT&#039;&#039;&#039; system key, but only when the header text tick box on the printing screen is ticked. It is ticked by default. Otherwise blank.&lt;br /&gt;
|-&lt;br /&gt;
| PLANT || The &#039;&#039;&#039;PLANT&#039;&#039;&#039; system key.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_DATE_MODE || The &#039;&#039;&#039;EXPIRY DATE MODE&#039;&#039;&#039; system key, BATCH or SSCC.&lt;br /&gt;
|-&lt;br /&gt;
| ZPL_LABEL_COUNT || The number of copies requested, for use with the ZPL &amp;lt;code&amp;gt;^PQ&amp;lt;/code&amp;gt; command. See the DEFINE BARCODE COUNT_MODE note in [[Label Template Syntax]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Values that are not fields but are useful on a label, such as the current user, the date and time of printing, and the Commander4j version, come from [[Label Function Syntax|functions]]: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;USERNAME()&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;TIMESTAMP(dd/MM/yyyy HH:mm)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;VERSION()&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Formatting a value ==&lt;br /&gt;
&lt;br /&gt;
A format can follow the field name after a &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; character. It applies to dates, times and numbers only, and is ignored for text.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Example !! Prints&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DATE_OF_MANUFACTURE*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 2026-03-01 (the default date format is yyyy-MM-dd)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DATE_OF_MANUFACTURE^dd/MM/yyyy*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 01/03/2026&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*PRINT_DATE^HH:mm*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 16:46&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 0224 (the default number format is 0000)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY^0*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 224&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY^000000*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 000224&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Date formats use the Java pattern letters: dd day, MM month, yy or yyyy year, HH hour, mm minute, ss second. Number formats use 0 for a digit that is always printed and # for a digit that is printed only when needed.&lt;br /&gt;
&lt;br /&gt;
Two things to be aware of:&lt;br /&gt;
&lt;br /&gt;
* Round brackets in a text value are printed as curly braces, so a description of &amp;lt;code&amp;gt;Widget (Blue)&amp;lt;/code&amp;gt; appears as &amp;lt;code&amp;gt;Widget {Blue}&amp;lt;/code&amp;gt;. This protects the function syntax, which uses round brackets.&lt;br /&gt;
* If a date format is invalid the label prints the field name and an error message in place of the date.&lt;br /&gt;
&lt;br /&gt;
== AutoLab4j ==&lt;br /&gt;
&lt;br /&gt;
[[AutoLab4j]] prints the same template files with the same placeholders and the same [[Label Function Syntax|functions]], but it is not connected to the database. Its values come from the dataset CSV file that Commander4j writes when a process order is assigned to a line, and the field names are the column headings of that file. The list is on [[AutoLab4j Dataset CSV]]. The &amp;lt;code&amp;gt;^format&amp;lt;/code&amp;gt; suffix described above is not applied by AutoLab4j, so dates and numbers are printed exactly as they appear in the CSV.&lt;br /&gt;
&lt;br /&gt;
[[LabelServer4j]] keeps its own copy of the label files, in its own folders, one set per site. They are not shared with the Commander4j &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder, so a change made to a Commander4j template has to be repeated in the LabelServer4j copy. Its command scripts can carry the same printer commands, but a value is written as &amp;lt;code&amp;gt;$data_NAME&amp;lt;/code&amp;gt;, where NAME is a column of the dataset CSV, and formatted with functions such as &amp;lt;code&amp;gt;SUBSTRING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;REPLACE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRACT_DATE&amp;lt;/code&amp;gt;. See [[LabelServer4j Operation]] and [[LabelServer4j Dataset CSV]].&lt;br /&gt;
&lt;br /&gt;
== Barcode variables ==&lt;br /&gt;
&lt;br /&gt;
A name defined with &#039;&#039;&#039;DEFINE BARCODE&#039;&#039;&#039; at the top of the template can also be used as a field. In the standard label, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*BARCODE1*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*BARCODE2*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; are the two GS1-128 barcodes with their code-set switching already worked out. This is explained in [[Label Template Syntax]].&lt;br /&gt;
&lt;br /&gt;
== For database administrators ==&lt;br /&gt;
&lt;br /&gt;
The pallet fields are the columns of the database view &#039;&#039;&#039;VIEW_PALLET_EXPIRY&#039;&#039;&#039; and the case fields are the columns of &#039;&#039;&#039;VIEW_LABEL_DATA&#039;&#039;&#039;. The columns are the same on MySQL, Microsoft SQL Server and Oracle. A site that needs an extra value on its labels can have these views extended, but the change is overwritten by upgrades, so talk to support first.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Layouts]]&lt;br /&gt;
* [[Changing a Label]]&lt;br /&gt;
* [[Label Template Syntax]]&lt;br /&gt;
* [[Label Function Syntax]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Template:Commander4j&amp;diff=1971</id>
		<title>Template:Commander4j</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Template:Commander4j&amp;diff=1971"/>
		<updated>2026-10-15T09:03:41Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:900px; padding:0.9em 1.2em; margin:0 0 1em 0; border:1px solid #c8d1e0; border-left:5px solid #1e40c8; border-radius:0 8px 8px 0; background:#f4f6fb;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;New here?&#039;&#039;&#039; Three steps get you from download to logged in: &#039;&#039;&#039;[[Downloads]]&#039;&#039;&#039; → &#039;&#039;&#039;[[Install Guide]]&#039;&#039;&#039; → &#039;&#039;&#039;[[First Login]]&#039;&#039;&#039;. The guide leads with Windows and Microsoft SQL Server Express, the most common setup, and covers macOS, Linux, MySQL and Oracle too. Already running Commander4j? See [[Upgrading]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
=Getting Started=&lt;br /&gt;
*[[Introduction]]&lt;br /&gt;
*[[Overview]]&lt;br /&gt;
*[[Requirements]]&lt;br /&gt;
*[[Downloads]]&lt;br /&gt;
*[[Install Guide]]&lt;br /&gt;
**[[Install Database]]&lt;br /&gt;
**[[Install Commander4j]]&lt;br /&gt;
**[[Setup4j|Setup4j (database connection)]]&lt;br /&gt;
**[[First Login]]&lt;br /&gt;
*[[Installation|Server components (Tomcat, services, printing)]]&lt;br /&gt;
*[[Upgrading|Upgrade]]&lt;br /&gt;
*[[Starting]]&lt;br /&gt;
*[[Logon]]&lt;br /&gt;
*[[Navigation]]&lt;br /&gt;
*[[Example Screens]]&lt;br /&gt;
*[[Getting Started|What to set up first]]&lt;br /&gt;
*[[Folder Structure]]&lt;br /&gt;
*[[Select Printer|Printer (choosing where labels and reports print)]]&lt;br /&gt;
*[[Label Layouts|Labels (what is printed and how to change it)]]&lt;br /&gt;
=User Guide=&lt;br /&gt;
&#039;&#039;Sections follow the application&#039;s main menu.&#039;&#039;&lt;br /&gt;
===Pallet Transactions===&lt;br /&gt;
*[[Pallet Label]]&lt;br /&gt;
**[[Production Declaration]]&lt;br /&gt;
**[[Process Order Assign to Labeller|Assign a process order to a labeller]]&lt;br /&gt;
*[[Production Confirmation|Confirm]]&lt;br /&gt;
*[[Despatch]]&lt;br /&gt;
*[[Pallet Admin|Pallet Info]]&lt;br /&gt;
*[[Pallet Issue]]&lt;br /&gt;
*[[Pallet Return]]&lt;br /&gt;
*[[Split Pallet]]&lt;br /&gt;
*[[Pallet History|History]]&lt;br /&gt;
*Setup&lt;br /&gt;
**[[Journeys]]&lt;br /&gt;
**[[Equipment Admin|Equipment]]&lt;br /&gt;
**[[Production Lines &amp;amp; Labellers|Production Lines]]&lt;br /&gt;
**[[Label Printers]]&lt;br /&gt;
===Tray &amp;amp; Case Labels===&lt;br /&gt;
*[[Case Label|Case Label Printing]]&lt;br /&gt;
*Setup&lt;br /&gt;
**[[Production Lines &amp;amp; Labellers|Production Lines]]&lt;br /&gt;
**[[Label Printers]]&lt;br /&gt;
===Waste===&lt;br /&gt;
*[[Waste Recording|Overview]]&lt;br /&gt;
*[[Waste Log]]&lt;br /&gt;
*[[Waste Reporting]]&lt;br /&gt;
**[[Waste Reports Examples]]&lt;br /&gt;
*Setup&lt;br /&gt;
**[[Waste Transactions|Transactions]]&lt;br /&gt;
**[[Waste Containers|Containers]]&lt;br /&gt;
**[[Waste Locations|Locations]]&lt;br /&gt;
**[[Waste Reporting Groups|Reporting Groups]]&lt;br /&gt;
**[[Waste Reporting IDs|Reporting IDs]]&lt;br /&gt;
**[[Waste Materials|Materials]]&lt;br /&gt;
**[[Waste Types|Types]]&lt;br /&gt;
**[[Waste Reasons|Reasons]]&lt;br /&gt;
**[[Link Location to Reporting ID|Location Link to Reporting ID]]&lt;br /&gt;
**[[Link Reporting ID to Location|Reporting ID Link to Location]]&lt;br /&gt;
===Quality Management===&lt;br /&gt;
*&#039;&#039;&#039;Panel Samples&#039;&#039;&#039;&lt;br /&gt;
**[[Quality Control Sample|Print Sample Labels]]&lt;br /&gt;
**[[Update Samples|Update Sample Results]]&lt;br /&gt;
**[[Results Enquiry]]&lt;br /&gt;
**[[Edit Sample]]&lt;br /&gt;
**[[Panel Results]]&lt;br /&gt;
**[[Results Analysis and Reporting|Results Analysis]]&lt;br /&gt;
**Setup&lt;br /&gt;
***[[Selection Lists]]&lt;br /&gt;
***[[Inspections]]&lt;br /&gt;
***[[Dictionary]]&lt;br /&gt;
*&#039;&#039;&#039;Weight Checks&#039;&#039;&#039;&lt;br /&gt;
**[[Weight Checks Module|Overview]]&lt;br /&gt;
**[[Weight Checks Data Capture|Weight Checks]]&lt;br /&gt;
**[[Weight Check Reports|Weight Report]]&lt;br /&gt;
**Setup&lt;br /&gt;
***[[Sample Point Admin|Sample Points]]&lt;br /&gt;
***[[Scale Admin|Scales]]&lt;br /&gt;
***[[Workstation Admin|Workstations]]&lt;br /&gt;
***[[Tolerable Negative Errors]]&lt;br /&gt;
***[[Product Groups]]&lt;br /&gt;
***[[Container Codes]]&lt;br /&gt;
*&#039;&#039;&#039;Sorting&#039;&#039;&#039;&lt;br /&gt;
**[[Pallet Samples &amp;amp; Faults]]&lt;br /&gt;
**[[Pallet Samples Enquiries &amp;amp; Reports|Enquiries &amp;amp; Reports]]&lt;br /&gt;
**Setup&lt;br /&gt;
***[[Pallet Sample Defect Types|Defect Types]]&lt;br /&gt;
***[[Pallet Sample Defect IDs|Defect IDs]]&lt;br /&gt;
***[[Sample Point Admin|Sample Points]]&lt;br /&gt;
***[[Pallet Sample Reasons|Sample Reasons]]&lt;br /&gt;
***[[Pallet Sample Shift Names|Shift Names]]&lt;br /&gt;
***[[Pallet Sample Packing Lines|Packing Lines]]&lt;br /&gt;
***[[Pallet Sample Supplier Admin|Suppliers]]&lt;br /&gt;
***[[Pallet Sample Operatives|Operatives]]&lt;br /&gt;
*&#039;&#039;&#039;Master Holds&#039;&#039;&#039;&lt;br /&gt;
**[[Isolate]]&lt;br /&gt;
**Setup&lt;br /&gt;
***[[Quality Control Decisions|Decisions]]&lt;br /&gt;
***[[Quality Control Reasons|Reasons]]&lt;br /&gt;
===Master Data===&lt;br /&gt;
*[[Customers]]&lt;br /&gt;
**[[Customer Data]]&lt;br /&gt;
*[[Locations]]&lt;br /&gt;
*[[Materials]]&lt;br /&gt;
*[[Material Locations]]&lt;br /&gt;
*[[Material Types]]&lt;br /&gt;
*[[Units of Measure|Units]]&lt;br /&gt;
*[[Material Batches|Batches]]&lt;br /&gt;
*[[Required Resources|Resources]]&lt;br /&gt;
*[[Process Orders|Orders]]&lt;br /&gt;
**[[Process Order Barcode]]&lt;br /&gt;
*[[Bill of Materials]]&lt;br /&gt;
**[[View / Edit]]&lt;br /&gt;
**[[Enquiries]]&lt;br /&gt;
**Setup&lt;br /&gt;
***[[Defaults]]&lt;br /&gt;
***[[Elements]]&lt;br /&gt;
***[[Structure]]&lt;br /&gt;
***[[Lists]]&lt;br /&gt;
===Administration===&lt;br /&gt;
*&#039;&#039;&#039;Customise Application&#039;&#039;&#039;&lt;br /&gt;
**[[Customising|Overview]]&lt;br /&gt;
**[[Menu Maintenance]]&lt;br /&gt;
**[[Toolbar Maintenance]]&lt;br /&gt;
**[[Scanner Menu Maintenance|RF Menu Maintenance]]&lt;br /&gt;
*&#039;&#039;&#039;Permissions&#039;&#039;&#039;&lt;br /&gt;
**[[Permissions|How permissions work]]&lt;br /&gt;
**[[Users]]&lt;br /&gt;
**[[Groups]]&lt;br /&gt;
**[[Audit Reports|Audit Log]]&lt;br /&gt;
*&#039;&#039;&#039;Setup&#039;&#039;&#039;&lt;br /&gt;
**[[System Keys|Settings]]&lt;br /&gt;
**[[Modules]]&lt;br /&gt;
**[[Language &amp;amp; Translations|Translations]]&lt;br /&gt;
**[[Email Settings]]&lt;br /&gt;
*&#039;&#039;&#039;Interfaces&#039;&#039;&#039;&lt;br /&gt;
**[[Interface Admin]]&lt;br /&gt;
**[[Process Messages]]&lt;br /&gt;
**[[Interface Log]]&lt;br /&gt;
**[[Request Queue]]&lt;br /&gt;
**[[Interface Service]]&lt;br /&gt;
**[[Install Interface Services]]&lt;br /&gt;
**[[Interface Message Formats]]&lt;br /&gt;
**[[Interface Example Data Flow 1]]&lt;br /&gt;
**[[Interface Example Data Flow 2]]&lt;br /&gt;
*&#039;&#039;&#039;Tools&#039;&#039;&#039;&lt;br /&gt;
**[[Report Admin|User Reports]]&lt;br /&gt;
***[[Report Properties]]&lt;br /&gt;
***[[Schema Browser]]&lt;br /&gt;
**[[Standard Reports]]&lt;br /&gt;
**[[Automatic Data Archiving|Archive Admin]]&lt;br /&gt;
**[[Clone4j]]&lt;br /&gt;
===Scanner web application===&lt;br /&gt;
*[[Web Applications Overview]]&lt;br /&gt;
*[[Quality Panel Web Interface]]&lt;br /&gt;
===Reference===&lt;br /&gt;
*&#039;&#039;&#039;Barcode labels&#039;&#039;&#039;&lt;br /&gt;
**[[Label Layouts|Overview]]&lt;br /&gt;
**[[Changing a Label]]&lt;br /&gt;
**[[Label Fields]]&lt;br /&gt;
**[[Label Template Syntax]]&lt;br /&gt;
**[[Label Function Syntax]]&lt;br /&gt;
**[[Zebra ZPL Label]]&lt;br /&gt;
**[[Intermec IPL Label]]&lt;br /&gt;
**[[Printer Queues]]&lt;br /&gt;
**[[Useful Information]]&lt;br /&gt;
*[[Database Schema used by Panel Samples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Template:Menu_Applications&amp;diff=1970</id>
		<title>Template:Menu Applications</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Template:Menu_Applications&amp;diff=1970"/>
		<updated>2026-10-15T09:03:40Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:980px; margin:0 auto 1.2em auto; padding:1.1em 1.4em; border:1px solid #c8d1e0; border-radius:10px; background:#f4f6fb;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:1.35em; font-weight:bold;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#1e40c8;&amp;quot;&amp;gt;Commander&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#d92d20;&amp;quot;&amp;gt;4j&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; and its companion applications &#039;&#039;&#039;bridge the gap between your ERP system and factory-floor labelling.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Orders and materials come down from the ERP. Operators print GS1 / SSCC pallet and case labels and record what was made. Production and despatch data go back up. Because Commander4j keeps its own database, labelling carries on when the link to head office is down and catches up when it returns.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;New here?&#039;&#039;&#039; Start with the [[Install Guide]] and you will be logged in within the hour. Everything is free and open source (GPL v3).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;c4j-fluid&amp;quot; style=&amp;quot;max-width:980px; margin:0 auto;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Commander4j_How_It_Fits.png|980px|center|link=]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Start here=&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;width:100%; max-width:980px; margin:0 auto; text-align:center; border-spacing:12px; table-layout:fixed;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;1. Download&#039;&#039;&#039;&amp;lt;br&amp;gt;Which installer file to pick for your PC.&amp;lt;br&amp;gt;[[Downloads|Downloads page]]&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;2. Install&#039;&#039;&#039;&amp;lt;br&amp;gt;Database, installer and Setup4j, step by step.&amp;lt;br&amp;gt;[[Install Guide|Install Guide]]&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;3. First login&#039;&#039;&#039;&amp;lt;br&amp;gt;Default user, then set up your first materials and orders.&amp;lt;br&amp;gt;[[First Login|First Login]]&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;Already installed?&#039;&#039;&#039;&amp;lt;br&amp;gt;Upgrading to a newer version.&amp;lt;br&amp;gt;[[Upgrading|Upgrading]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | &#039;&#039;&#039;What is on a label, and how do I change it?&#039;&#039;&#039;&amp;lt;br&amp;gt;Start with [[Label Layouts]] for a plain-language tour of the pallet label, then [[Changing a Label]] to make your first change in half an hour.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=The core suite=&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;width:100%; max-width:980px; margin:0 auto; text-align:center; border-spacing:12px; table-layout:fixed;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Commander4j_256x256.png|link=[[Commander4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[Commander4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Production recording, pallet and case labelling, despatch, quality, waste and weight checks. The core application.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Middleware4j_256x256.png|link=[[Middleware4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[Middleware4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Converts and routes files between your ERP and Commander4j (CSV, XML, IDOC, fixed width).&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LabelServer4j_256x256.png|link=[[LabelServer4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LabelServer4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Background service that sends label data to case and secondary labellers.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:AutoLab4j_256x256.png|link=[[AutoLab4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[AutoLab4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Automatic pallet labelling triggered by the production line (MODBUS).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Tools and utilities=&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;width:100%; max-width:980px; margin:0 auto; text-align:center; border-spacing:12px; table-layout:fixed;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:ZPLRenderer_256x256.png|link=[[ZPLRenderer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ZPLRenderer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Renders Zebra ZPL label commands on screen, from a file or over the network. Emulates a printer for testing.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LogoRenderer_256x256.png|link=[[LogoRenderer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LogoRenderer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Renders Logopak label templates and emulates a Logopak labeller&#039;s TCP protocol for local testing.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LogoClient_256x256.png|link=[[LogoClient]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LogoClient]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Companion to LogoRenderer for developing and testing solutions that talk to Logopak labellers.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:SocketTest_256x256.png|link=[[SocketTest]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SocketTest]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Emulate a TCP/IP client or server to test printers, labellers and other network devices.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Modbus_256x256.png|link=[[ModbusBridge]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ModbusBridge]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Relays values between a Modbus client and server, bridging communication between Modbus devices.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Modbus_256x256.png|link=[[ModbusClient]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ModbusClient]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Connect to a Modbus server, then view and change register and coil values.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Modbus_256x256.png|link=[[ModbusServer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[ModbusServer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Run a Modbus server on your PC to simulate line equipment, then view and change its values.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:sftpTransfer_256x256.png|link=[[SFTPTransfer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SFTPTransfer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Moves files automatically between a local folder and a remote SFTP server in both directions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:SFTGet4j_256x256.png|link=[[SFTPGet]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SFTPGet]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Watches a remote SFTP folder and moves each file that appears to a local folder.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:SFTPSend4j_256x256.png|link=[[SFTPSend]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[SFTPSend]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Watches a local folder and moves each file that appears to a remote SFTP folder.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:XMLViewer_256x256.png|link=[[XMLViewer]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[XMLViewer]]&#039;&#039;&#039;&amp;lt;br&amp;gt;A simple viewer for XML documents, handy for checking interface messages.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:Menu4j_256x256.png|link=[[Menu4j]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[Menu4j]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Tree-based menu for organising and launching applications and command-line scripts from a single XML file.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:TreeDoc_256x256.png|link=[[TreeDoc]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[TreeDoc]]&#039;&#039;&#039;&amp;lt;br&amp;gt;Creates plain-text documents that describe a folder structure.&lt;br /&gt;
| style=&amp;quot;border:1px solid #c8d1e0; border-radius:10px; background:#fff; vertical-align:top;&amp;quot; | [[File:LaunchPad_256x256.png|link=[[LaunchPad]]|100px]]&amp;lt;br&amp;gt;&#039;&#039;&#039;[[LaunchPad]]&#039;&#039;&#039;&amp;lt;br&amp;gt;A replacement for the Launchpad application that Apple removed in macOS 26.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Case_Label&amp;diff=1969</id>
		<title>Case Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Case_Label&amp;diff=1969"/>
		<updated>2026-10-15T09:03:39Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Commander4j]]&lt;br /&gt;
[[file:Case_Label.png|link=|700px]]&lt;br /&gt;
&lt;br /&gt;
The above screen is used to print Case Labels.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
There are two methods to print a label depending on the type of printer or labeller that you want to use. They are described on the [[Pallet Label#Switching to a barcode printer|Pallet Label]] page and in plain language on [[Label Layouts]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Case Label&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Description&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| 1 || Process Order or Works Order Number can be typed in or picked using the lookup button.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Process Order Status is shown in &amp;lt;span style=&amp;quot;color:#FFFFFF; background:#ff0000&amp;quot;&amp;gt;RED&amp;lt;/span&amp;gt; if the order is closed.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Date of Manufacture will default to the computers system clock but you can amend it manually if necessary. The expiry date of the pallet is calculated by adding the shelf life to the date of manufacture.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || The screen determines what a full pallet quantity would contain by reference to [[Material UOMs]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Expiry Date is calculated by adding the Shelf Life settings found in the [[Materials]] screen to the Date of Manufacture but you can override if necessary.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Preview is only applicable for &amp;quot;Standard&amp;quot; reports which are created for any printer. If you change the RPT_PACK_LABEL module to use a Zebra ZPL compatible Label then you won&#039;t be able to preview the label on screen.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Number of labels.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || The Label button is used to generate a label and sent it do the printer from the desktop client and is subtly different to the Assign to Labeller button (10) which is used to drive external labelling applications such as the [[AutoLab4j]] application.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || This is the name of the print queue that you want the label to be sent to when using the Label button (8). It is important to understand the difference between the type types of label printing mechanisms and the print queue requirements. See [[Printer Queues]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || See [[Process Order Assign to Labeller]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || The structure - content of the [[Batch Number]] gets its default format from the [[System Keys]] screen. However you can override it on the [[Customers]] screen. This allows the content of the label to be different depending on which customer id is assigned to the [[Process Orders]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file: Case_Label_Preview.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
The placeholders available on a case label differ slightly from a pallet label; see [[Label Fields#Case and tray labels|Label Fields]].&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Pallet_Label&amp;diff=1968</id>
		<title>Pallet Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Pallet_Label&amp;diff=1968"/>
		<updated>2026-10-15T09:03:38Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Commander4j]]&lt;br /&gt;
See also [[Production Declaration]] and [[Production Confirmation]]&lt;br /&gt;
&lt;br /&gt;
[[file:Pallet label2.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
The above screen is used to print Pallet Labels (labels which include a unique Serial Shipping Container Code - SSCC). The number sequence used is define in the [[System Keys]] screen.&lt;br /&gt;
&lt;br /&gt;
There are two methods to print a label depending on the type of printer or labeller that you want to use. They are described in the section [[#Switching to a barcode printer|Switching to a barcode printer]] below, and in plain language on [[Label Layouts]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Pallet Label&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Process Order or Works Order Number can be typed in or picked using the lookup button.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Process Order Status is shown in &amp;lt;span style=&amp;quot;color:#FFFFFF; background:#ff0000&amp;quot;&amp;gt;RED&amp;lt;/span&amp;gt; if the order is closed.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Date of Manufacture will default to the computers system clock but you can amend it manually if necessary. The expiry date of the pallet is calculated by adding the shelf life to the date of manufacture.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || The screen determines what a full pallet quantity would contain by reference to [[Material UOMs]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Expiry Date is calculated by adding the Shelf Life settings found in the [[Materials]] screen to the Date of Manufacture but you can override if necessary.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Preview is only applicable for &amp;quot;Standard&amp;quot; reports which are created for any printer. If you change the PALLET_LABEL module to use a Zebra ZPL compatible Label then you won&#039;t be able to preview the label on screen.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Number of SSCC&#039;s is not necessarily the same as number of labels. Some reports will print labels in pairs so 1 SSCC = 2 labels which have the same SSCC. This is common place as placing a pallet label on 2 difference faces of a pallet makes it more likely that at least one will be visible at all times.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || The Label button is used to generate a label and sent it do the printer from the desktop client and is subtly different to the Assign to Labeller button (10) which is used to drive external labelling applications such as the [[AutoLab4j]] application.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || This is the name of the print queue that you want the label to be sent to when using the Label button (8). It is important to understand the difference between the type types of label printing mechanisms and the print queue requirements. See [[Printer Queues]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || See [[Process Order Assign to Labeller]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || The [[Confirmed Status]] checkbox is important as it triggers the generation of an outbound Production Declaration message. You have 2 options here. If you want to print all your labels in advance you can leave the confirmed checkbox unselected - you can then confirm each pallet using the Production Confirmation transaction on the desktop or scanner. If you want you can confirm as you print. The deciding factory comes back to traceability. If you want the date of manufacture to be accurate you should not confirm the pallet label when it is printed but do it when the pallet is actually ready to have the label applied.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || The structure - content of the [[Batch Number]] gets its default format from the [[System Keys]] screen. However you can override it on the [[Customers]] screen. This allows the content of the label to be different depending on which customer id is assigned to the [[Process Orders]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:Pallet_Label_Preview2.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
Examples of a pallet labels Zebra XiIII Plus (300dpi) **left** and Intermec IPL (200dpi) **right**&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:Zebra_Intermec_Pallet.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Switching to a barcode printer ==&lt;br /&gt;
&lt;br /&gt;
Labels designed for barcode printers rather than general reports are text templates held in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder. [[Label Layouts]] explains what is on a label and how the templates work, [[Zebra ZPL Label]] shows the standard template, and [[Label Template Syntax]] is the reference.&lt;br /&gt;
&lt;br /&gt;
You should be aware that there are two main methods for the application to send data to a printer which depends on the type of printer or labeller that you want to use.&lt;br /&gt;
&lt;br /&gt;
The default config after installing will be a label which can be sent to any standard desktop printer and has the advantage that when you print the label you have the option of displaying the label on screen.&lt;br /&gt;
&lt;br /&gt;
If you have a Zebra compatible barcode printer you can amend the configuration so that it sends ZPL commands to that printer. This will be faster to print and the quality of the barcode will be better.&lt;br /&gt;
&lt;br /&gt;
The following screens show how to change the report type. To create or change a layout of your own, follow [[Changing a Label]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Admin_Menu.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The screens below show how to switch pallet label types and reports. You should note that the Modules database is used to define screens as well as reports. To help reduce the number of items in the list you can filter them using the module type as shown here.&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Admin1.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
Select the report called &amp;quot;RPT_PALLET_LABEL&amp;quot; and click on the edit button.&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Pallet_Report1.png|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
[[file:Module_Pallet_Report2.png|link=|600px]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Zebra_ZPL_Label&amp;diff=1967</id>
		<title>Zebra ZPL Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Zebra_ZPL_Label&amp;diff=1967"/>
		<updated>2026-10-15T09:03:37Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Zebra ZPL Label&#039;&#039;&#039; is the standard pallet label that ships with Commander4j, shown first as it prints and then as the template that produces it. The template is the file &amp;lt;code&amp;gt;zebra_300dpi_pallet_label_a5_standard.lbl&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder. If you want to change it, [[Changing a Label]] takes you through the steps; this page explains what each block does.&lt;br /&gt;
&lt;br /&gt;
The label on the left below was printed from this template on a 300 dpi Zebra printer. The one on the right is the [[Intermec IPL Label|Intermec equivalent]].&lt;br /&gt;
&lt;br /&gt;
[[file:Zebra_Intermec_Pallet.png|link=|800px]]&lt;br /&gt;
&lt;br /&gt;
== The template block by block ==&lt;br /&gt;
&lt;br /&gt;
The template is divided into blocks by comment lines (&amp;lt;code&amp;gt;/* ... */&amp;lt;/code&amp;gt;). The table follows the file from top to bottom. Positions are in printer dots from the top-left corner; at 300 dpi there are about 12 dots to a millimetre.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Block !! What it prints !! Notes for anyone editing it&lt;br /&gt;
|-&lt;br /&gt;
| DEFINE BARCODE lines || Nothing directly. They build the two barcode values and declare the code-set switching characters. || Leave alone unless you are changing what the barcodes contain. Explained in [[Label Template Syntax]].&lt;br /&gt;
|-&lt;br /&gt;
| Label initialisation || &amp;lt;code&amp;gt;^XA&amp;lt;/code&amp;gt; starts the label, &amp;lt;code&amp;gt;^LT0060&amp;lt;/code&amp;gt; shifts the whole label down slightly, &amp;lt;code&amp;gt;^PW1800&amp;lt;/code&amp;gt; sets the print width to 1800 dots (6 inches at 300 dpi). || Change &amp;lt;code&amp;gt;^PW&amp;lt;/code&amp;gt; if your label stock is a different width.&lt;br /&gt;
|-&lt;br /&gt;
| Heading || The customer name top left (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*CUSTOMER_NAME*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) and the label number top right (L1, L2). || To print a fixed company name instead, replace the placeholder with the text.&lt;br /&gt;
|-&lt;br /&gt;
| Product codes || The caption MATERIAL and the product code underneath. || The caption is plain text after &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; and can be changed to anything.&lt;br /&gt;
|-&lt;br /&gt;
| MAFF statement || The optional header text (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*HEADER_COMMENT*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) from the LABEL_HEADER_COMMENT system key. || Blank if the header text box on the screen is unticked.&lt;br /&gt;
|-&lt;br /&gt;
| Printed by || &amp;quot;Commander4j&amp;quot; and the version number in small type. || Can be removed.&lt;br /&gt;
|-&lt;br /&gt;
| Horizontal bar and sight lines || A rule across the label with short vertical marks at each end. This block repeats between sections. || &amp;lt;code&amp;gt;^GB&amp;lt;/code&amp;gt; draws boxes and lines. The last number is the line thickness.&lt;br /&gt;
|-&lt;br /&gt;
| Pallet number SSCC || The caption SSCC and the 18-digit number in large type, split into four groups with SUBSTRING so it is easy to read. || The groups are 3, 5, 5 and 5 digits. Keep them if your customers read the number by eye.&lt;br /&gt;
|-&lt;br /&gt;
| Content, EAN, variant, quantity and layers || Four captions and the GTIN (padded to 14 digits), variant, case count and layer count. || A line that starts with &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; inside this block is a disabled command, kept for reference.&lt;br /&gt;
|-&lt;br /&gt;
| Product description || The caption DESCRIPTION and the description text. || Long descriptions can run off the label. Reduce the font width (the second number after &amp;lt;code&amp;gt;^A0N,&amp;lt;/code&amp;gt;) if they do.&lt;br /&gt;
|-&lt;br /&gt;
| Batch and best before || Captions BATCH/LOT and BEST BEFORE (MM YYYY), then the batch number and the expiry month and year. || The expiry format is set by the EXPIRYDATE function. &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;EXPIRYDATE(dd/MM/yyyy)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; prints a full date.&lt;br /&gt;
|-&lt;br /&gt;
| Top barcode || The GS1-128 barcode for content, variant, best before, count and batch, with the human-readable text underneath in brackets. || &amp;lt;code&amp;gt;^BCN,350&amp;lt;/code&amp;gt; sets the barcode height to 350 dots. The text line underneath must match what is in the barcode.&lt;br /&gt;
|-&lt;br /&gt;
| Bottom barcode || The GS1-128 barcode for the SSCC alone, with (00) and the number underneath. || This is the barcode most customers scan. Do not reduce its size without checking with them.&lt;br /&gt;
|-&lt;br /&gt;
| End of label || &amp;lt;code&amp;gt;^XZ&amp;lt;/code&amp;gt; ends the label. The lines after it are part of the original design and print nothing. || Leave as is.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The complete template ==&lt;br /&gt;
&lt;br /&gt;
In the code below you will find a mix of standard Zebra ZPL printer commands and Commander4j specific instructions, plus some comments. For information on the ZPL commands see the [[Useful Information]] page. The Commander4j instructions are described in [[Label Template Syntax]] and the placeholders in [[Label Fields]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FFFFFF; background:#1E8449&amp;quot;&amp;gt;Pallet Label - Zebra - ZPL - 300dpi&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE BARCODE1   02&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;20&amp;lt;PADLEFT(&amp;lt;*VARIANT*&amp;gt;,2,0)&amp;gt;15&amp;lt;EXPIRYDATE(yy)&amp;gt;&amp;lt;EXPIRYDATE(MM)&amp;gt; &amp;lt;EXPIRYDATE(dd)&amp;gt;37&amp;lt;*QUANTITY^0000*&amp;gt;^10&amp;lt;*BATCH_NUMBER*&amp;gt;&lt;br /&gt;
 DEFINE BARCODE BARCODE2   00&amp;lt;*SSCC*&amp;gt;&lt;br /&gt;
 DEFINE BARCODE FNC1       &amp;gt;8&lt;br /&gt;
 DEFINE BARCODE CODEA      &amp;gt;9&lt;br /&gt;
 DEFINE BARCODE CODEB      &amp;gt;6&lt;br /&gt;
 DEFINE BARCODE CODEC      &amp;gt;;&lt;br /&gt;
 DEFINE BARCODE END        *END*&lt;br /&gt;
 &lt;br /&gt;
 /* Label initialisation  /*&lt;br /&gt;
 &lt;br /&gt;
 ^XA^LT0060^XZ^XA&lt;br /&gt;
 ^PW1800&lt;br /&gt;
 /*  =====================================LABEL 1=========================================================================== */&lt;br /&gt;
 &lt;br /&gt;
 /* Heading for Label 1 */&lt;br /&gt;
 &lt;br /&gt;
 ^FO60,0002^A0N,120,110^CI27^FH^FD&amp;lt;*CUSTOMER_NAME*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 ^FO1625,0002^A0N,120,110^CI27^FDL&amp;lt;*LABEL_NO*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* CS3 and SAP Product Codes */&lt;br /&gt;
 &lt;br /&gt;
 ^FO80,0190^A0N,50,50^CI27^FDMATERIAL^FS&lt;br /&gt;
 &lt;br /&gt;
 ^FO80,0250^A0N,100,100^CI27^FD&amp;lt;*MATERIAL*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* MAFF Statement */&lt;br /&gt;
 &lt;br /&gt;
 ^FO0080,0370^A0N,50,50^CI27^FH^FD&amp;lt;*HEADER_COMMENT*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Printed by xxxxxxxxxxxxxxxx * /&lt;br /&gt;
 &lt;br /&gt;
 ^FO1400,0400^A0N,30,30^CI27^FDCommander4j &amp;lt;VERSION()&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Horizontal Bar and Sight Lines */&lt;br /&gt;
 &lt;br /&gt;
 ^FO25,0420^GB0,80,9^FS&lt;br /&gt;
 ^FO1770,0420^GB0,80,9^FS&lt;br /&gt;
 ^FO55,0450^GB1690,0,6^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Pallet Number SSCC */&lt;br /&gt;
 &lt;br /&gt;
 ^FO80,0490^A0N,50,50^CI27^FDSSCC^FS&lt;br /&gt;
 ^FO080,0550^A0N,240,160^CI27^FD&amp;lt;SUBSTRING(&amp;lt;*SSCC*&amp;gt;,1,3)&amp;gt;^FS&lt;br /&gt;
 ^FO390,0550^A0N,240,160^CI27^FD&amp;lt;SUBSTRING(&amp;lt;*SSCC*&amp;gt;,4,5)&amp;gt;^FS&lt;br /&gt;
 ^FO850,0550^A0N,240,160^CI27^FD&amp;lt;SUBSTRING(&amp;lt;*SSCC*&amp;gt;,9,5)&amp;gt;^FS&lt;br /&gt;
 ^FO1300,0550^A0N,240,160^CI27^FD&amp;lt;SUBSTRING(&amp;lt;*SSCC*&amp;gt;,14,5)&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Horizontal Bar and Sight Lines */&lt;br /&gt;
 &lt;br /&gt;
 ^FO25,0760^GB0,80,9^FS&lt;br /&gt;
 ^FO1770,0760^GB0,80,9^FS&lt;br /&gt;
 ^FO55,0790^GB1690,0,6^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Content EAN Variant Quantity &amp;amp; Layers*/&lt;br /&gt;
 &lt;br /&gt;
 ^FO80,0830^A0N,50,50^CI27^FDCONTENT^FS&lt;br /&gt;
 ^FO830,0830^A0N,50,50^CI27^FDVARIANT^FS&lt;br /&gt;
 ^FO1100,0830^A0N,50,50^CI27^FDCOUNT^FS&lt;br /&gt;
 ^FO1450,0830^A0N,50,50^CI27^FDLAYERS^FS&lt;br /&gt;
 &lt;br /&gt;
 ^FO80,0890^A0N,100,100^CI27^FD&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* ^FO830,0890^A0N,100,100^CI27^FD/^FS&lt;br /&gt;
 ^FO830,0890^A0N,100,100^CI27^FD&amp;lt;PADLEFT(&amp;lt;*VARIANT*&amp;gt;,2,0)&amp;gt;^FS&lt;br /&gt;
 ^FO1100,0890^A0N,100,100^CI27^FD&amp;lt;*QUANTITY*&amp;gt;^FS&lt;br /&gt;
 ^FO1450,0890^A0N,100,100^CI27^FD&amp;lt;*LAYERS*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Product Description */&lt;br /&gt;
 &lt;br /&gt;
 ^FO80,1070^A0N,50,50^CI27^FDDESCRIPTION^FS&lt;br /&gt;
 ^FO080,1130^A0N,100,75^CI27^FH^FD&amp;lt;*DESCRIPTION*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Horizontal Bar and Sight Lines */&lt;br /&gt;
 &lt;br /&gt;
 ^FO25,1220^GB0,80,9^FS&lt;br /&gt;
 ^FO1770,1220^GB0,80,9^FS&lt;br /&gt;
 ^FO55,1250^GB1690,0,6^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Batch (Works Order) and Best Before End Date */&lt;br /&gt;
 &lt;br /&gt;
 ^FO200,1300^A0N,50,50^CI27^FDBATCH/LOT^FS&lt;br /&gt;
 &lt;br /&gt;
 ^FO900,1300^A0N,50,50^CI27^FDBEST BEFORE (MM YYYY)^FS&lt;br /&gt;
 &lt;br /&gt;
 ^FO200,1360^A0N,100,100^CI27^FD&amp;lt;*BATCH_NUMBER*&amp;gt;^FS&lt;br /&gt;
 ^FO1085,1360^A0N,100,100^CI27^FD&amp;lt;EXPIRYDATE(MM)&amp;gt; &amp;lt;EXPIRYDATE(yyyy)&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Horizontal Bar and Sight Lines */&lt;br /&gt;
 &lt;br /&gt;
 ^FO25,1450^GB0,80,9^FS&lt;br /&gt;
 ^FO1770,1450^GB0,80,9^FS&lt;br /&gt;
 ^FO55,1480^GB1690,0,6^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Top Barcode */&lt;br /&gt;
 &lt;br /&gt;
 ^BY5,3.0^FO100,1533^BCN,350,N,N,Y,N^FR^FD&amp;lt;*BARCODE1*&amp;gt;^FS&lt;br /&gt;
 ^FO150,1886^A0N,56,52^CI27^FR^FD(02)&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;(20)&amp;lt;PADLEFT(&amp;lt;*VARIANT*&amp;gt;,2,0)&amp;gt;(15)&amp;lt;EXPIRYDATE(yy)&amp;gt; &amp;lt;EXPIRYDATE(MM)&amp;gt;&amp;lt;EXPIRYDATE(dd)&amp;gt;(37)&amp;lt;*QUANTITY*&amp;gt;(10)&amp;lt;*BATCH_NUMBER*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Bottom Barcode */&lt;br /&gt;
 &lt;br /&gt;
 ^BY9,3.0^FO175,1990^BCN,380,N,N,Y,N^FR^FD&amp;lt;*BARCODE2*&amp;gt;^FS&lt;br /&gt;
 ^FO600,2373^A0N,56,52^CI27^FR^FD(00)&amp;lt;*SSCC*&amp;gt;^FS&lt;br /&gt;
 &lt;br /&gt;
 /* Horizontal Bar and Sight Lines */&lt;br /&gt;
 &lt;br /&gt;
 ^FO25,2420^GB0,80,9^FS&lt;br /&gt;
 ^FO1770,2420^GB0,80,9^FS&lt;br /&gt;
 ^FO55,2450^GB1690,0,6^FS&lt;br /&gt;
 &lt;br /&gt;
 ^XZ&lt;br /&gt;
 &lt;br /&gt;
 /* End of Label */&lt;br /&gt;
 &lt;br /&gt;
 ^XA^LT0060^XZ^XA&lt;br /&gt;
 &lt;br /&gt;
 /* End of Label */&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Layouts]]&lt;br /&gt;
* [[Changing a Label]]&lt;br /&gt;
* [[Label Fields]]&lt;br /&gt;
* [[Label Template Syntax]]&lt;br /&gt;
* [[Intermec IPL Label]]&lt;br /&gt;
* [[ZPLRenderer|ZPL Renderer]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:LabelServer4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Function_Syntax&amp;diff=1966</id>
		<title>Label Function Syntax</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Function_Syntax&amp;diff=1966"/>
		<updated>2026-10-15T09:03:36Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Label Function Syntax&#039;&#039;&#039; is the reference for the functions that can be used inside a label template to format a value before it is printed: trimming text, padding numbers with zeros, and printing dates in the format a customer asks for. The same functions work in Commander4j and [[AutoLab4j]].&lt;br /&gt;
&lt;br /&gt;
If you are new to label templates, start with [[Label Layouts]]. The names of the values you can format are listed on [[Label Fields]], and [[Label Template Syntax]] explains how a template file is put together.&lt;br /&gt;
&lt;br /&gt;
There are a number of functions which you can embed in your barcode label template to help format the data before sending to a labeller.&lt;br /&gt;
&lt;br /&gt;
Referencing field names uses this syntax.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;*fieldname*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;*SSCC*&amp;gt;  &amp;lt;*QUANTITY*&amp;gt;  &amp;lt;*DESCRIPTION*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Functions are resolved innermost-first, so they can be nested. The result of an inner function is passed as the input to the function which encloses it.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PADLEFT(&amp;lt;SUBSTRING(&amp;lt;*BATCH*&amp;gt;,1,3)&amp;gt;,5,0)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a function is given the wrong number of parameters it returns the function name followed by &#039;&#039;&#039;[Incorrect number of parameters]&#039;&#039;&#039;, and a function given an invalid date/time format returns the function name followed by &#039;&#039;&#039;[Incorrect date/time format]&#039;&#039;&#039;. This makes mistakes visible on the printed label rather than failing silently.&lt;br /&gt;
&lt;br /&gt;
===DATE_CREATED===&lt;br /&gt;
&lt;br /&gt;
This function returns the date &amp;amp; time when the pallet record was created in the database and allows you to specify the format that you want it formatted in the label.&lt;br /&gt;
&lt;br /&gt;
Example usage&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;DATE_CREATED(ddMMyy)&amp;gt;&lt;br /&gt;
 &amp;lt;DATE_CREATED(dd/MM/yyyy)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the value of the DATE_CREATED field is null or blank it will return spaces instead of date.&lt;br /&gt;
&lt;br /&gt;
===DATETIME===&lt;br /&gt;
&lt;br /&gt;
The function allows you to format a datetime/timestamp field value from the database and display it in the label using the format specified.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;DATETIME(fieldname,dd/MM/yyyy  HH:mm:ss)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXPIRYDATE===&lt;br /&gt;
&lt;br /&gt;
When a label is printed Commander4j will automatically calculate the expiry date of the product. It is important to realise however that the application has 2 modes for recording the expiry date. It can be associated with the individual pallet number (SSCC) or it can be associated with the batch number. The mode that the system is using is defined in [[System Keys]] using the setting called &#039;&#039;&#039;EXPIRY DATE MODE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function will retrieve the value from the appropriate table based on the setting above.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;EXPIRYDATE(MM yyyy)&amp;gt;&lt;br /&gt;
 &amp;lt;EXPIRYDATE(MM)&amp;gt;&lt;br /&gt;
 &amp;lt;EXPIRYDATE(yy)&amp;gt;&lt;br /&gt;
 &amp;lt;EXPIRYDATE(dd)&amp;gt; &amp;lt;EXPIRYDATE(MM)&amp;gt; &amp;lt;EXPIRYDATE(yyyy)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IIF===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IIF(param1,param2,param3,param4)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 IF param1 = param2 then&lt;br /&gt;
   return param3&lt;br /&gt;
 else&lt;br /&gt;
   return param4&lt;br /&gt;
&lt;br /&gt;
===JULIAN_YJJJ===&lt;br /&gt;
&lt;br /&gt;
This function returns the production / manufacturing data in the format {last digit of year}{Julian day number}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;JULIAN_YJJJ()&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LEFT===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;LEFT(fieldname,5)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LOWERCASE===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;LOWERCASE(fieldname)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LTRIM===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;LTRIM(fieldname)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PADLEFT===&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;PADLEFT(fieldname,14,0)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function pads out the size of a string to the length specified using the character specified.&lt;br /&gt;
&lt;br /&gt;
It adds any additional characters to the left size of the string.&lt;br /&gt;
&lt;br /&gt;
===PADRIGHT===&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;PADRIGHT(fieldname,14,0)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function pads out the size of a string to the length specified using the character specified.&lt;br /&gt;
&lt;br /&gt;
It adds any additional characters to the right size of the string.&lt;br /&gt;
&lt;br /&gt;
===PALLET_WEIGHT_BARCODE===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PALLET_WEIGHT_BARCODE(KG,3)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function returns the total weight of the pallet (looked up from the pallet&#039;s SSCC) formatted to the number of decimal places specified, but with the decimal point &#039;&#039;&#039;removed&#039;&#039;&#039; so that the value can be embedded directly in a barcode.&lt;br /&gt;
&lt;br /&gt;
The first parameter is the unit of measure for the weight; if it is left blank it defaults to &#039;&#039;&#039;KG&#039;&#039;&#039;. The second parameter is the number of decimal places.&lt;br /&gt;
&lt;br /&gt;
For example a weight of 123.456 KG would produce &#039;&#039;&#039;123456&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PALLET_WEIGHT_BARCODE(KG,3)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#PALLET_WEIGHT_TEXT|PALLET_WEIGHT_TEXT]], which is identical but keeps the decimal point for human-readable display.&lt;br /&gt;
&lt;br /&gt;
===PALLET_WEIGHT_TEXT===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PALLET_WEIGHT_TEXT(KG,3)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function returns the total weight of the pallet (looked up from the pallet&#039;s SSCC) formatted to the number of decimal places specified, for display as human-readable text on the label.&lt;br /&gt;
&lt;br /&gt;
The first parameter is the unit of measure for the weight; if it is left blank it defaults to &#039;&#039;&#039;KG&#039;&#039;&#039;. The second parameter is the number of decimal places.&lt;br /&gt;
&lt;br /&gt;
For example a weight of 123.456 KG would produce &#039;&#039;&#039;123.456&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PALLET_WEIGHT_TEXT(KG,3)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the same as [[#PALLET_WEIGHT_BARCODE|PALLET_WEIGHT_BARCODE]] except that the decimal point is retained.&lt;br /&gt;
&lt;br /&gt;
===PRODDATE===&lt;br /&gt;
&lt;br /&gt;
This function returns the production / date of manufacture of the pallet and allows you to specify the format that you want it displayed in on the label.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PRODDATE(dd/MM/yyyy)&amp;gt;&lt;br /&gt;
 &amp;lt;PRODDATE(ddMMyy)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the format is left blank it defaults to &#039;&#039;&#039;dd/MM/yyyy&#039;&#039;&#039;. If the date of manufacture is null it returns spaces of the same length as the format specified instead of a date.&lt;br /&gt;
&lt;br /&gt;
===RIGHT===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RIGHT(fieldname,5)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RTRIM===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RTRIM(fieldname)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SUBSTRING===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;SUBSTRING(fieldname,start,length)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function returns part of a string. &#039;&#039;&#039;start&#039;&#039;&#039; is the position of the first character to extract (the first character is position 1) and &#039;&#039;&#039;length&#039;&#039;&#039; is the number of characters to return.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;SUBSTRING(fieldname,1,3)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would return the first 3 characters of the field. The function is bounds-safe; if the input is shorter than requested it returns as many characters as are available rather than producing an error.&lt;br /&gt;
&lt;br /&gt;
===SUBTR_LPAD===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;SUBTR_LPAD(fieldname,start,length,size,padchar)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function first left-pads the input value out to &#039;&#039;&#039;size&#039;&#039;&#039; characters using &#039;&#039;&#039;padchar&#039;&#039;&#039;, and then returns a substring of the padded value starting at position &#039;&#039;&#039;start&#039;&#039;&#039; (the first character is position 1) for &#039;&#039;&#039;length&#039;&#039;&#039; characters.&lt;br /&gt;
&lt;br /&gt;
For example, if a field contains &#039;&#039;&#039;12&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;SUBTR_LPAD(fieldname,1,4,4,0)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would first pad the value to &#039;&#039;&#039;0012&#039;&#039;&#039; and then return the first 4 characters &#039;&#039;&#039;0012&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===TIMESTAMP===&lt;br /&gt;
&lt;br /&gt;
This function returns the current system date &amp;amp; time at the moment the label is printed, formatted using the format specified.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;TIMESTAMP(dd/MM/yyyy HH:mm:ss)&amp;gt;&lt;br /&gt;
 &amp;lt;TIMESTAMP(ddMMyy)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the format is left blank it defaults to &#039;&#039;&#039;dd/MM/yyyy HH:mm:ss&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===TRIM===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;TRIM(fieldname)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UPPERCASE===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UPPERCASE(fieldname)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USERNAME===&lt;br /&gt;
&lt;br /&gt;
This function returns the name of the user currently logged on to Commander4j, in upper case.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;USERNAME()&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===VERSION===&lt;br /&gt;
&lt;br /&gt;
This function returns the version number of the Commander4j application.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;VERSION()&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Layouts]]&lt;br /&gt;
* [[Label Fields]]&lt;br /&gt;
* [[Label Template Syntax]]&lt;br /&gt;
* [[Changing a Label]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Template_Syntax&amp;diff=1965</id>
		<title>Label Template Syntax</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Template_Syntax&amp;diff=1965"/>
		<updated>2026-10-15T09:03:35Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Label Template Syntax&#039;&#039;&#039; describes how a label template file is put together. A template is the file that Commander4j, and [[AutoLab4j]], send to a barcode printer after filling in the values for a pallet or case. If you only want to make a small change to an existing label, [[Changing a Label]] is a gentler starting point; this page is the reference behind it.&lt;br /&gt;
&lt;br /&gt;
== The idea in one paragraph ==&lt;br /&gt;
&lt;br /&gt;
A label template is a plain text file in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder. Most of it is written in the printer&#039;s own language, ZPL for Zebra or IPL for Intermec, exactly as you would find in the printer&#039;s programming guide. Wherever a value should change from one pallet to the next, the template contains a placeholder instead of a fixed value. When a label is printed, Commander4j reads the template, swaps every placeholder for the real value, works out the barcode code-set switching, and sends the result to the printer as one stream of text. The printer never sees the placeholders.&lt;br /&gt;
&lt;br /&gt;
Two worked examples are on this wiki: [[Zebra ZPL Label]] and [[Intermec IPL Label]].&lt;br /&gt;
&lt;br /&gt;
== What a template contains ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Kind of line !! Looks like !! What happens to it&lt;br /&gt;
|-&lt;br /&gt;
| Comment || &amp;lt;code&amp;gt;/* Product description */&amp;lt;/code&amp;gt; || Any line that starts with &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; is dropped before the label is sent. Use comments to label each block. Putting &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; at the start of a printer command is a handy way to switch that line off without deleting it.&lt;br /&gt;
|-&lt;br /&gt;
| Printer command || &amp;lt;code&amp;gt;^FO80,1070^A0N,50,50^FDDESCRIPTION^FS&amp;lt;/code&amp;gt; || Sent to the printer unchanged, apart from placeholders and functions inside it.&lt;br /&gt;
|-&lt;br /&gt;
| Placeholder || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DESCRIPTION*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Replaced by the value of that field. The available names are listed on [[Label Fields]].&lt;br /&gt;
|-&lt;br /&gt;
| Function || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Formats a value before it is printed. Functions can be nested; the innermost runs first. See [[Label Function Syntax]].&lt;br /&gt;
|-&lt;br /&gt;
| Directive || &amp;lt;code&amp;gt;DEFINE BARCODE BARCODE2 00&amp;lt;nowiki&amp;gt;&amp;lt;*SSCC*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || An instruction to Commander4j itself. Directives are read and removed; they are never sent to the printer. They are described below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Blank lines are ignored and leading spaces are trimmed, so the file can be laid out for readability.&lt;br /&gt;
&lt;br /&gt;
== Placeholders ==&lt;br /&gt;
&lt;br /&gt;
A placeholder is a field name between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;*SSCC*&amp;gt;  &amp;lt;*QUANTITY*&amp;gt;  &amp;lt;*DESCRIPTION*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dates and numbers accept a format after a &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; character:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;*DATE_OF_MANUFACTURE^dd/MM/yyyy*&amp;gt;&lt;br /&gt;
 &amp;lt;*QUANTITY^000000*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without a format a date prints as yyyy-MM-dd and a number is padded to four digits. The format is ignored for text fields.&lt;br /&gt;
&lt;br /&gt;
Three rules worth knowing:&lt;br /&gt;
&lt;br /&gt;
* A placeholder whose name is not available on this screen prints the name followed by &#039;&#039;&#039;not found!&#039;&#039;&#039; so the mistake is visible on the label.&lt;br /&gt;
* Round brackets inside a text value are printed as curly braces, because round brackets have a meaning in function syntax.&lt;br /&gt;
* Names defined with DEFINE BARCODE take precedence over database fields of the same name.&lt;br /&gt;
&lt;br /&gt;
== Directives ==&lt;br /&gt;
&lt;br /&gt;
Directives are lines that Commander4j acts on and removes. They are normally placed at the top of the file. A directive must be the first thing on its line.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Directive !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DEFINE BARCODE name value&amp;lt;/code&amp;gt; || Creates a barcode variable. Explained in detail below.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DEFINE BARCODE COUNT_MODE ZPL&amp;lt;/code&amp;gt; || Tells Commander4j to send the label once and let the printer make the copies. Pair it with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;^PQ&amp;lt;*ZPL_LABEL_COUNT*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; in the template, which prints the number of copies the operator asked for. Without this directive Commander4j sends the whole label once per copy and ZPL_LABEL_COUNT is always 1.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SUPPRESS EOL&amp;lt;/code&amp;gt; || Joins all the lines together with no line endings. Needed by some printer languages.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SUPPRESS UNICODE&amp;lt;/code&amp;gt; || Stops accented and other non-ASCII characters being converted to the &amp;lt;code&amp;gt;_XX&amp;lt;/code&amp;gt; hex escape form that Zebra printers read after &amp;lt;code&amp;gt;^FH&amp;lt;/code&amp;gt;. Use it only for printers that do not use this escape form.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SUPPRESS ASCII ENCODE&amp;lt;/code&amp;gt; || Switches off the conversion of control-character names such as &amp;lt;code&amp;gt;&amp;amp;lt;STX&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;ETX&amp;amp;gt;&amp;lt;/code&amp;gt; into the real control characters before the label is sent. The shipped Intermec templates start with this line. When writing a template for a non-Zebra printer, copy the directives from the shipped template for that printer make rather than working them out from scratch.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DEFINE BARCODE in detail ==&lt;br /&gt;
&lt;br /&gt;
This is the part of a template that needs the most care, and it only matters when you are changing what is encoded in a barcode. For a caption or date change you can leave it alone.&lt;br /&gt;
&lt;br /&gt;
DEFINE BARCODE BARCODE1   02&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;20&amp;lt;PADLEFT(&amp;lt;*VARIANT*&amp;gt;,2,0)&amp;gt;15&amp;lt;EXPIRYDATE(yy)&amp;gt;&amp;lt;EXPIRYDATE(MM)&amp;gt;&amp;lt;EXPIRYDATE(dd)&amp;gt;37&amp;lt;*QUANTITY^0000*&amp;gt;^10&amp;lt;*BATCH_NUMBER*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line is used to create a barcode variable. You may wonder why you cannot use the same string to print the label and skip this step. The reason that using the Zebra ZPL language, when encoding in the Code 128 barcode symbology you need to determine what type of data is in the barcode. Numeric data can be compressed when it appears in pairs (even number) of characters. Alphabetic characters have to use a different encoding.&lt;br /&gt;
&lt;br /&gt;
So - the purpose of the DEFINE BARCODE directive it to let Commander4j look at the complete barcode string in advance and insert the appropriate commands to switch Code Sets before the data is sent to the barcode printer.&lt;br /&gt;
&lt;br /&gt;
The Printer Commands which are used to switch between modes are also defined below.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE BARCODE2   00&amp;lt;*SSCC*&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is another example of a barcode variable.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE FNC1       &amp;gt;8&lt;br /&gt;
&lt;br /&gt;
FNC1 is required only at the end of variable length data section. It is not required as the last character in the bar code.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE CODEA      &amp;gt;9&lt;br /&gt;
&lt;br /&gt;
Subset A supports numbers, upper-case letters, and control characters, such as tab and new-line&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE CODEB      &amp;gt;6&lt;br /&gt;
&lt;br /&gt;
Subset B supports numbers, upper- and lower-case letters and some additional characters.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE CODEC      &amp;gt;;&lt;br /&gt;
&lt;br /&gt;
Subset C supports numbers only. It must have an even number of digits.&lt;br /&gt;
&lt;br /&gt;
 DEFINE BARCODE END        *END*&lt;br /&gt;
&lt;br /&gt;
This is used to indicate the end of the DEFINE section of the label.&lt;br /&gt;
&lt;br /&gt;
Because a DEFINE BARCODE line is split on spaces, the value must not contain a space.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Layouts]]&lt;br /&gt;
* [[Changing a Label]]&lt;br /&gt;
* [[Label Fields]]&lt;br /&gt;
* [[Label Function Syntax]]&lt;br /&gt;
* [[Zebra ZPL Label]]&lt;br /&gt;
* [[Intermec IPL Label]]&lt;br /&gt;
* [[Useful Information]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Changing_a_Label&amp;diff=1964</id>
		<title>Changing a Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Changing_a_Label&amp;diff=1964"/>
		<updated>2026-10-15T09:03:34Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Changing a Label&#039;&#039;&#039; walks through the smallest useful change to a pallet label: copying the standard Zebra template, altering one thing, checking it on screen, and telling Commander4j to use it. It takes about half an hour the first time. If you have never seen a label template before, read [[Label Layouts]] first.&lt;br /&gt;
&lt;br /&gt;
The walk-through uses a Zebra printer because the free [[ZPLRenderer|ZPL Renderer]] lets you see the result without printing anything. The steps are the same for other printer makes except that you cannot preview.&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
&lt;br /&gt;
* You can log in to Commander4j with a user that has access to &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039; and &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039;.&lt;br /&gt;
* You know where Commander4j is installed. The label templates live in the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder underneath it; see [[Folder Structure]].&lt;br /&gt;
* You have a plain text editor. Notepad on Windows or TextEdit on a Mac is fine. Do not use Word.&lt;br /&gt;
* For the preview step, install [[ZPLRenderer|ZPL Renderer]] from the [[Downloads]] page on any PC on the same network. The Commander4j PC itself is simplest.&lt;br /&gt;
&lt;br /&gt;
== Step 1. Copy the standard template ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder find&lt;br /&gt;
&lt;br /&gt;
 zebra_300dpi_pallet_label_a5_standard.lbl&lt;br /&gt;
&lt;br /&gt;
and copy it to a new name, for example&lt;br /&gt;
&lt;br /&gt;
 zebra_300dpi_pallet_label_mysite.lbl&lt;br /&gt;
&lt;br /&gt;
Always work on a copy. The standard file is replaced when Commander4j is upgraded, and a copy with your own name is left alone.&lt;br /&gt;
&lt;br /&gt;
== Step 2. Make one change ==&lt;br /&gt;
&lt;br /&gt;
Open your copy in the text editor. It is a mixture of three things:&lt;br /&gt;
&lt;br /&gt;
* Lines beginning with &amp;lt;code&amp;gt;/*&amp;lt;/code&amp;gt; are comments. They describe the block that follows and are never sent to the printer.&lt;br /&gt;
* Zebra commands such as &amp;lt;code&amp;gt;^FO&amp;lt;/code&amp;gt; (position) and &amp;lt;code&amp;gt;^A0N,100,100&amp;lt;/code&amp;gt; (font and size). Each line draws one thing.&lt;br /&gt;
* Placeholders such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DESCRIPTION*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, which Commander4j swaps for the real value. The full list is on [[Label Fields]].&lt;br /&gt;
&lt;br /&gt;
Here are three safe changes. Pick one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change a caption.&#039;&#039;&#039; Find the line&lt;br /&gt;
&lt;br /&gt;
 ^FO900,1300^A0N,50,50^CI27^FDBEST BEFORE (MM YYYY)^FS&lt;br /&gt;
&lt;br /&gt;
The text after &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; is what prints. Change it to &amp;lt;code&amp;gt;USE BY (MM YYYY)&amp;lt;/code&amp;gt;. Leave everything before &amp;lt;code&amp;gt;^FD&amp;lt;/code&amp;gt; alone.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change a date format.&#039;&#039;&#039; Find the line&lt;br /&gt;
&lt;br /&gt;
 ^FO1085,1360^A0N,100,100^CI27^FD&amp;lt;EXPIRYDATE(MM)&amp;gt; &amp;lt;EXPIRYDATE(yyyy)&amp;gt;^FS&lt;br /&gt;
&lt;br /&gt;
and replace the two functions with one: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;EXPIRYDATE(dd/MM/yyyy)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The caption above it should then be changed to match. The letters inside the brackets are explained in [[Label Function Syntax]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make text bigger.&#039;&#039;&#039; In &amp;lt;code&amp;gt;^A0N,100,75&amp;lt;/code&amp;gt; the two numbers are the height and width of the characters in printer dots. Increase both to make the text larger, and remember that wider text needs more room before it runs into the next field.&lt;br /&gt;
&lt;br /&gt;
Save the file as plain text with the &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; extension.&lt;br /&gt;
&lt;br /&gt;
== Step 3. Check the layout on screen ==&lt;br /&gt;
&lt;br /&gt;
Open [[ZPLRenderer|ZPL Renderer]], set the DPI to 300 and the label size to match your stock, and open your &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file with the &#039;&#039;&#039;Open&#039;&#039;&#039; button. You will see the label with the placeholder names printed where the values will go, and the barcodes will not be meaningful because they have not yet been filled in. That is expected. This check is for position, font size and spelling only.&lt;br /&gt;
&lt;br /&gt;
Edit the file, save it, and press &#039;&#039;&#039;Refresh&#039;&#039;&#039; in ZPL Renderer to see the change.&lt;br /&gt;
&lt;br /&gt;
== Step 4. Tell Commander4j to use your file ==&lt;br /&gt;
&lt;br /&gt;
# Log in to Commander4j and open &#039;&#039;&#039;Administration › Setup › Modules&#039;&#039;&#039;.&lt;br /&gt;
# Set the type filter to &#039;&#039;&#039;Reports&#039;&#039;&#039; and find &#039;&#039;&#039;RPT_PALLET_LABEL&#039;&#039;&#039;. Double-click it, or select it and press &#039;&#039;&#039;Edit&#039;&#039;&#039;.&lt;br /&gt;
# Set &#039;&#039;&#039;Report Type&#039;&#039;&#039; to &#039;&#039;&#039;Label&#039;&#039;&#039;. This tells Commander4j the file is a printer template rather than a standard report. Print Preview is not available for labels.&lt;br /&gt;
# In &#039;&#039;&#039;Report Filename&#039;&#039;&#039; press the &#039;&#039;&#039;...&#039;&#039;&#039; button and choose your file from the &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
# The lower part of the screen holds the printer settings for the label: &#039;&#039;&#039;Group ID&#039;&#039;&#039; (Pallet), &#039;&#039;&#039;Printer Type&#039;&#039;&#039; (Zebra), &#039;&#039;&#039;Language&#039;&#039;&#039; (ZPL), &#039;&#039;&#039;DPI&#039;&#039;&#039; (300) and &#039;&#039;&#039;Direct Print&#039;&#039;&#039;. These must match the printer you will choose in the next step, otherwise the printer is not offered on the Pallet Label screen.&lt;br /&gt;
# Press &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If several labels are in use at your site, check [[Label Layouts#Which label file is used|which label file is used]] before editing RPT_PALLET_LABEL, because a material type, material or customer may be pointing at a different module.&lt;br /&gt;
&lt;br /&gt;
== Step 5. Print with real data to the screen ==&lt;br /&gt;
&lt;br /&gt;
This step uses ZPL Renderer as a pretend printer, so you see the label filled in with a real pallet&#039;s values without using any label stock.&lt;br /&gt;
&lt;br /&gt;
# In ZPL Renderer press the &#039;&#039;&#039;Network&#039;&#039;&#039; button. It now listens on port 9100, the same port a real Zebra printer uses.&lt;br /&gt;
# In Commander4j open &#039;&#039;&#039;Pallet Transactions › Setup › Label Printers&#039;&#039;&#039; and press &#039;&#039;&#039;Add&#039;&#039;&#039;. Give it an ID such as PREVIEW and choose the &#039;&#039;&#039;Pallet&#039;&#039;&#039; group.&lt;br /&gt;
# Set Printer Type to Zebra, Language to ZPL, DPI to 300, a paper size that matches your stock, the IP address of the PC running ZPL Renderer (127.0.0.1 if it is the same PC) and port 9100. Tick &#039;&#039;&#039;Enabled&#039;&#039;&#039; and &#039;&#039;&#039;Direct Print&#039;&#039;&#039;, then &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
# Open the &#039;&#039;&#039;Pallet Label&#039;&#039;&#039; screen, pick a process order, choose PREVIEW in the device drop-down and press &#039;&#039;&#039;Label&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The filled-in label appears in ZPL Renderer. If PREVIEW is missing from the drop-down, compare the five settings on the printer with the ones on the module in step 4; they have to agree. See [[Label Printers]].&lt;br /&gt;
&lt;br /&gt;
Note that printing to PREVIEW still creates a pallet record and uses an SSCC number, exactly as a real print would. Use a test process order.&lt;br /&gt;
&lt;br /&gt;
== Step 6. Go live ==&lt;br /&gt;
&lt;br /&gt;
Once you are happy, choose the real printer on the Pallet Label screen instead of PREVIEW. You can leave the PREVIEW printer defined for next time, or untick &#039;&#039;&#039;Enabled&#039;&#039;&#039; so operators do not pick it by mistake.&lt;br /&gt;
&lt;br /&gt;
Keep a copy of your &amp;lt;code&amp;gt;.lbl&amp;lt;/code&amp;gt; file somewhere outside the Commander4j folder. It is the only record of your label design.&lt;br /&gt;
&lt;br /&gt;
== Going further ==&lt;br /&gt;
&lt;br /&gt;
* To add a value that is not on the standard label, find its name on [[Label Fields]], copy an existing text line and change the position and placeholder.&lt;br /&gt;
* To change what is encoded in a barcode, read the DEFINE BARCODE section of [[Label Template Syntax]] first. The GS1 rules are strict and a customer&#039;s scanner will reject a barcode that breaks them.&lt;br /&gt;
* [[Zebra ZPL Label]] explains the standard template block by block.&lt;br /&gt;
* The [https://support.zebra.com/cpws/docs/zpl/zpl-zbi2-pm-en.pdf Zebra ZPL Programming Guide] describes every command.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
	<entry>
		<id>https://wiki.commander4j.com/index.php?title=Label_Fields&amp;diff=1963</id>
		<title>Label Fields</title>
		<link rel="alternate" type="text/html" href="https://wiki.commander4j.com/index.php?title=Label_Fields&amp;diff=1963"/>
		<updated>2026-10-15T09:03:33Z</updated>

		<summary type="html">&lt;p&gt;Dgarratt: Updated by push_wiki.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Label Fields&#039;&#039;&#039; lists every value you can place on a label template. This is the page to open when you want to add something to a label and need to know what it is called.&lt;br /&gt;
&lt;br /&gt;
A value is placed on the label by writing its name between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. When the label is printed, Commander4j replaces the placeholder with the real value for that pallet or case.&lt;br /&gt;
&lt;br /&gt;
 ^FD&amp;lt;*DESCRIPTION*&amp;gt;^FS&lt;br /&gt;
&lt;br /&gt;
prints the product description. Names are written in capitals exactly as listed below. See [[Label Template Syntax]] for how a whole template is put together and [[Label Function Syntax]] for ways to format a value before it is printed.&lt;br /&gt;
&lt;br /&gt;
Which names are available depends on which screen prints the label, because each screen reads a different set of data. The tables below are split the same way. If a name is used that is not available, the label prints the name followed by &#039;&#039;&#039;not found!&#039;&#039;&#039; in its place, so a mistake is visible on paper rather than silent.&lt;br /&gt;
&lt;br /&gt;
== Pallet labels ==&lt;br /&gt;
&lt;br /&gt;
These fields are available on labels printed from the [[Pallet Label]] screen and from the other pallet screens that can print a label: [[Production Declaration]], [[Pallet Issue]], [[Pallet Return]], [[Split Pallet]] and the pallet label re-print dialog. The values are read from the pallet record together with its material, batch and customer.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! What it prints&lt;br /&gt;
|-&lt;br /&gt;
| SSCC || text || The 18-digit pallet number.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL || text || Product code.&lt;br /&gt;
|-&lt;br /&gt;
| DESCRIPTION || text || Product description from [[Materials]].&lt;br /&gt;
|-&lt;br /&gt;
| OLD_MATERIAL || text || The previous product code held on the material, if you use one.&lt;br /&gt;
|-&lt;br /&gt;
| EAN || text || GTIN of the unit on the pallet. Usually wrapped in PADLEFT to make it 14 digits: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;PADLEFT(&amp;lt;*EAN*&amp;gt;,14,0)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| VARIANT || text || GS1 variant of the unit on the pallet, usually padded to 2 digits.&lt;br /&gt;
|-&lt;br /&gt;
| QUANTITY || number || Number of units on the pallet. Printed as a whole number padded to 4 digits unless a format is given, for example &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY^0*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for no padding.&lt;br /&gt;
|-&lt;br /&gt;
| UOM || text || Unit of measure for QUANTITY.&lt;br /&gt;
|-&lt;br /&gt;
| LAYERS || number || Number of layers on the pallet.&lt;br /&gt;
|-&lt;br /&gt;
| BATCH_NUMBER || text || Batch or lot number.&lt;br /&gt;
|-&lt;br /&gt;
| PROCESS_ORDER || text || Process order number.&lt;br /&gt;
|-&lt;br /&gt;
| REQUIRED_RESOURCE || text || Production line or resource from the process order.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_OF_MANUFACTURE || date || Date of manufacture. Prefer the [[Label Function Syntax#PRODDATE|PRODDATE]] function, which formats it for you.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_DATE || date || Expiry date held against the batch. Prefer the [[Label Function Syntax#EXPIRYDATE|EXPIRYDATE]] function, which picks the batch or pallet date according to the &#039;&#039;&#039;EXPIRY DATE MODE&#039;&#039;&#039; setting.&lt;br /&gt;
|-&lt;br /&gt;
| SSCC_EXPIRY_DATE || date || Expiry date held against the pallet. Only populated when EXPIRY DATE MODE is SSCC.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_CREATED || date and time || When the pallet record was created. Prefer the [[Label Function Syntax#DATE_CREATED|DATE_CREATED]] function.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_UPDATED || date and time || When the pallet record was last changed.&lt;br /&gt;
|-&lt;br /&gt;
| CREATED_BY_USER_ID, UPDATED_BY_USER_ID || text || Who created or last changed the pallet record.&lt;br /&gt;
|-&lt;br /&gt;
| CUSTOMER_ID || text || Customer code from the process order.&lt;br /&gt;
|-&lt;br /&gt;
| CUSTOMER_NAME || text || Customer name from [[Customers]].&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_ON_LABEL || text || The customer&#039;s print-on-label flag from [[Customers]].&lt;br /&gt;
|-&lt;br /&gt;
| LOCATION_ID || text || Where the pallet currently is.&lt;br /&gt;
|-&lt;br /&gt;
| STATUS || text || Pallet status.&lt;br /&gt;
|-&lt;br /&gt;
| CONFIRMED || text || Y once the pallet has been confirmed, otherwise N.&lt;br /&gt;
|-&lt;br /&gt;
| DESPATCH_NO || text || Despatch number, blank until the pallet is despatched.&lt;br /&gt;
|-&lt;br /&gt;
| MHN_NUMBER, DECISION || text || Master hold notice number and quality decision, if the pallet is on hold.&lt;br /&gt;
|-&lt;br /&gt;
| EQUIPMENT_TYPE || text || The pallet or equipment type.&lt;br /&gt;
|-&lt;br /&gt;
| GROSS_WEIGHT, NET_WEIGHT, WEIGHT_UOM || number, number, text || Weights held on the material record. For the total pallet weight use the [[Label Function Syntax#PALLET_WEIGHT_TEXT|PALLET_WEIGHT_TEXT]] function.&lt;br /&gt;
|-&lt;br /&gt;
| PART_NO || text || The customer&#039;s part number for this material, from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| CASE_CONTENT || text || Free text describing the case contents, from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| ALT_TEXT_1 || text || Spare free text for this material and customer, from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| BASE_EAN, BASE_VARIANT || text || GTIN and variant of the base unit of the material.&lt;br /&gt;
|-&lt;br /&gt;
| BASE_UOM || text || The base unit of measure.&lt;br /&gt;
|-&lt;br /&gt;
| BASE_QUANTITY || number || Pallet quantity converted into base units.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Case and tray labels ==&lt;br /&gt;
&lt;br /&gt;
These fields are available on labels printed from the [[Case Label]] screen. Note that several names differ from the pallet list: the GTIN is &#039;&#039;&#039;PROD_EAN&#039;&#039;&#039; here rather than EAN, the description is &#039;&#039;&#039;MATERIAL_DESCRIPTION&#039;&#039;&#039;, and there is no SSCC or LAYERS. A pallet template used as a case label prints &amp;quot;not found!&amp;quot; for those.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! What it prints&lt;br /&gt;
|-&lt;br /&gt;
| UNIQUE_ID || text || Internal identifier for this print request.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL || text || Product code.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL_DESCRIPTION || text || Product description.&lt;br /&gt;
|-&lt;br /&gt;
| MATERIAL_TYPE || text || Material type code.&lt;br /&gt;
|-&lt;br /&gt;
| PROD_EAN, PROD_VARIANT || text || GTIN and variant of the unit being labelled.&lt;br /&gt;
|-&lt;br /&gt;
| PROD_QUANTITY || number || Quantity being labelled.&lt;br /&gt;
|-&lt;br /&gt;
| PROD_UOM || text || Unit of measure for PROD_QUANTITY.&lt;br /&gt;
|-&lt;br /&gt;
| BASE_EAN, BASE_VARIANT, BASE_QUANTITY, BASE_UOM || mixed || The same values for the base unit.&lt;br /&gt;
|-&lt;br /&gt;
| BATCH_NUMBER || text || Batch number as printed.&lt;br /&gt;
|-&lt;br /&gt;
| BATCH_PREFIX, BATCH_SUFFIX || text || The parts added to the batch number, when used.&lt;br /&gt;
|-&lt;br /&gt;
| OVERRIDE_BATCH_PREFIX, OVERRIDE_MANUFACTURE_DATE, OVERRIDE_EXPIRY_DATE || text || Y when the operator overrode the default, otherwise N.&lt;br /&gt;
|-&lt;br /&gt;
| PROCESS_ORDER || text || Process order number.&lt;br /&gt;
|-&lt;br /&gt;
| REQUIRED_RESOURCE || text || Production line or resource.&lt;br /&gt;
|-&lt;br /&gt;
| LINE || text || The production line chosen on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| LOCATION_ID || text || Location from the process order.&lt;br /&gt;
|-&lt;br /&gt;
| DATE_OF_MANUFACTURE || date || Date of manufacture. Add a format, for example &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DATE_OF_MANUFACTURE^dd/MM/yyyy*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_DATE || date || Expiry date. Add a format in the same way.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_MODE || text || BATCH or SSCC.&lt;br /&gt;
|-&lt;br /&gt;
| CUSTOMER_ID, CUSTOMER_NAME || text || Customer code and name.&lt;br /&gt;
|-&lt;br /&gt;
| PART_NO, ALT_TEXT_1 || text || Customer-specific text from [[Customer Data]].&lt;br /&gt;
|-&lt;br /&gt;
| LABEL_TYPE || text || Pack or Pallet.&lt;br /&gt;
|-&lt;br /&gt;
| MODULE_ID || text || The report module that produced the label.&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_DATE || date and time || When the label was requested.&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_COPIES || number || Number of copies requested.&lt;br /&gt;
|-&lt;br /&gt;
| PRINT_QUEUE_NAME || text || The queue or printer chosen.&lt;br /&gt;
|-&lt;br /&gt;
| USER_ID, WORKSTATION_ID || text || Who printed it and from which PC.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Labels printed by the [[Quality Control Sample]] screen use their own, smaller set of fields and are not covered here.&lt;br /&gt;
&lt;br /&gt;
== Fields that are always available ==&lt;br /&gt;
&lt;br /&gt;
These are added by Commander4j for every label template, whichever screen prints it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! What it prints&lt;br /&gt;
|-&lt;br /&gt;
| LABEL_NO || The copy number, 1 for the first label of a pallet, 2 for the second and so on. The standard label prints it as L1, L2.&lt;br /&gt;
|-&lt;br /&gt;
| HEADER_COMMENT || The text of the &#039;&#039;&#039;LABEL_HEADER_COMMENT&#039;&#039;&#039; system key, but only when the header text tick box on the printing screen is ticked. It is ticked by default. Otherwise blank.&lt;br /&gt;
|-&lt;br /&gt;
| PLANT || The &#039;&#039;&#039;PLANT&#039;&#039;&#039; system key.&lt;br /&gt;
|-&lt;br /&gt;
| EXPIRY_DATE_MODE || The &#039;&#039;&#039;EXPIRY DATE MODE&#039;&#039;&#039; system key, BATCH or SSCC.&lt;br /&gt;
|-&lt;br /&gt;
| ZPL_LABEL_COUNT || The number of copies requested, for use with the ZPL &amp;lt;code&amp;gt;^PQ&amp;lt;/code&amp;gt; command. See the DEFINE BARCODE COUNT_MODE note in [[Label Template Syntax]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Values that are not fields but are useful on a label, such as the current user, the date and time of printing, and the Commander4j version, come from [[Label Function Syntax|functions]]: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;USERNAME()&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;TIMESTAMP(dd/MM/yyyy HH:mm)&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;VERSION()&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Formatting a value ==&lt;br /&gt;
&lt;br /&gt;
A format can follow the field name after a &amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt; character. It applies to dates, times and numbers only, and is ignored for text.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Example !! Prints&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DATE_OF_MANUFACTURE*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 2026-03-01 (the default date format is yyyy-MM-dd)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*DATE_OF_MANUFACTURE^dd/MM/yyyy*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 01/03/2026&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*PRINT_DATE^HH:mm*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 16:46&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 0224 (the default number format is 0000)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY^0*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 224&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*QUANTITY^000000*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || 000224&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Date formats use the Java pattern letters: dd day, MM month, yy or yyyy year, HH hour, mm minute, ss second. Number formats use 0 for a digit that is always printed and # for a digit that is printed only when needed.&lt;br /&gt;
&lt;br /&gt;
Two things to be aware of:&lt;br /&gt;
&lt;br /&gt;
* Round brackets in a text value are printed as curly braces, so a description of &amp;lt;code&amp;gt;Widget (Blue)&amp;lt;/code&amp;gt; appears as &amp;lt;code&amp;gt;Widget {Blue}&amp;lt;/code&amp;gt;. This protects the function syntax, which uses round brackets.&lt;br /&gt;
* If a date format is invalid the label prints the field name and an error message in place of the date.&lt;br /&gt;
&lt;br /&gt;
== AutoLab4j ==&lt;br /&gt;
&lt;br /&gt;
[[AutoLab4j]] prints the same template files with the same placeholders and the same [[Label Function Syntax|functions]], but it is not connected to the database. Its values come from the dataset CSV file that Commander4j writes when a process order is assigned to a line, and the field names are the column headings of that file. The list is on [[AutoLab4j Dataset CSV]]. The &amp;lt;code&amp;gt;^format&amp;lt;/code&amp;gt; suffix described above is not applied by AutoLab4j, so dates and numbers are printed exactly as they appear in the CSV.&lt;br /&gt;
&lt;br /&gt;
[[LabelServer4j]] does not use these template files. It drives Logopak and similar labellers with its own command scripts, which share the same family of functions; see [[LabelServer4j Operation]].&lt;br /&gt;
&lt;br /&gt;
== Barcode variables ==&lt;br /&gt;
&lt;br /&gt;
A name defined with &#039;&#039;&#039;DEFINE BARCODE&#039;&#039;&#039; at the top of the template can also be used as a field. In the standard label, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*BARCODE1*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;*BARCODE2*&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; are the two GS1-128 barcodes with their code-set switching already worked out. This is explained in [[Label Template Syntax]].&lt;br /&gt;
&lt;br /&gt;
== For database administrators ==&lt;br /&gt;
&lt;br /&gt;
The pallet fields are the columns of the database view &#039;&#039;&#039;VIEW_PALLET_EXPIRY&#039;&#039;&#039; and the case fields are the columns of &#039;&#039;&#039;VIEW_LABEL_DATA&#039;&#039;&#039;. The columns are the same on MySQL, Microsoft SQL Server and Oracle. A site that needs an extra value on its labels can have these views extended, but the change is overwritten by upgrades, so talk to support first.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Label Layouts]]&lt;br /&gt;
* [[Changing a Label]]&lt;br /&gt;
* [[Label Template Syntax]]&lt;br /&gt;
* [[Label Function Syntax]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commander4j]]&lt;br /&gt;
[[Category:AutoLab4j]]&lt;/div&gt;</summary>
		<author><name>Dgarratt</name></author>
	</entry>
</feed>