^HW - Host Directory List
Sends a listing of the objects held in printer memory back to the host.
^HW lists the contents of one of the printer's memory devices, and returns the listing
over the link as fixed-width ASCII. Software that downloads fonts and graphics uses it
to check whether an object is already resident. Its printed counterpart is ^WD, and
the difference decides this page: ^HW answers the host and renders no label.
Syntax
^HWd:o.x,fSupport
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
Returns a file listing over the printer's link. The store it would list holds only the objects ~DG downloaded earlier in the same request. The end of the request discards it, so a listing would be near-empty. The renderer does not parse this command. It reports IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is also silent, so the rendered label is identical in both engines. — not pinned by a test
Labelary renders this command.
Parameters
dStorage deviceoptional · single characterWhich memory device to list: R:, E:, B:, A: or Z:. This service keeps one object store, so the device letter would not narrow the search.
- Default
- R:
- Invalid value
- not documented, and we have not measured it. The renderer does not parse or measure this command.
- Test coverage
oObject nameoptional · textName pattern to match, one to eight alphanumeric characters. * and ? are wildcards, so ^HWR:*.* lists everything.
- Default
- *
- Invalid value
- not documented, and we have not measured it. The renderer does not parse or measure this command.
- Test coverage
xExtensionoptional · textExtension pattern to match, * for any.
- Default
- *
- Invalid value
- not documented, and we have not measured it. The renderer does not parse or measure this command.
- Test coverage
fListing formatoptional · one of a setLayout of the reply for the host.
- Default
- D
- Invalid value
- not documented, and we have not measured it. The renderer does not parse or measure this command.
- Test coverage
- No documented value is exercised by a test (D, C).
D- Default one-entry-per-line listing (default)
C- Column layout
Behavior
The reply has a fixed shape, not free text:
<STX>;- a
DIR R:header line; - one line per object that starts with
*— eight columns for the name, a full stop and three for the extension, then the size and three reserved option flags; - a
-xxxxxxx bytes freeline; <ETX>.
The columns are fixed, so a name longer than eight characters cannot appear in full.
Like every ^ command, the printer processes ^HW in the order it appears in the
format, not on arrival. The guide adds that the printer answers when it can, not
immediately.
A render request has no link to answer on, and little to list. Its object store holds
only what its own ~DG or ~DY commands put there, and it ends with the request. The
renderer ignores the command, and the page is unchanged. It reports IGNORED_COMMAND at
info severity, which does not reach X-Warnings. Labelary is also silent.
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- The listing-format argument
fis Labelary's, not the guide's. The 2006 guide's format line is^HWd:o.xand its parameter table documents three arguments, with no choice of reply layout. — not pinned by a test
Example
Listing everything on R: in the default reply layout. The earlier version of this page showed ^HWR: with no name or extension pattern; the guide's own example is ^HWR:*.*, which is what is used here.
^XA
^HWR:*.*,D
^FO50,50^A0N,40,40^FDDirectory query^FS
^XZ
Related commands
^WDPrint Directory LabelPrints a label listing the objects held in printer memory.^HYUpload GraphicsSends a stored graphic back to the host as an image file.^IDImage DeleteDeletes a stored object from printer memory.~DGDownload GraphicDownloads an ASCII-hex bitmap into printer memory as a `.GRF` object.^HZDisplay Description InformationSends printer status, configuration or object descriptions back to the host as XML.