^WD - Print Directory Label
Prints a label listing the objects held in printer memory.
^WD prints a directory listing on a label: the objects on a memory device, or, at
Z:, the resident fonts and bar codes. It asks what ^HW asks, but answers on media
rather than over the link, so it adds a page.
Syntax
^WDd:o.xSupport
Every documented parameter renders the same output Labelary produces.
Prints the listing ^HW would send to the host, so unlike ^HW it fills a page. The renderer prints it as the page after the format that carries the command, wherever in the format the command sits, and counts it in X-Total-Count. The page names the objects the request itself put into memory before the command ran, in alphabetical order, under the heading DIRECTORY OF and the mask. A second ^WD in one format prints one page, of the mask the second command gave. Each format carrying a ^WD prints its own page, ^PQ replicates the label alone, and a ^WD sent between formats prints nothing. Only the label width reaches the layout, setting how wide the box is ruled. A ^PW ahead of the ^WD centers the page in the print window and cuts the rest away. A ^POI ahead of it turns the page over. Either one after the ^WD leaves the page alone, even though the page follows the label (measured 2026-08-16). Only ^WD is a command; ~WD prints nothing. — not pinned by a test
Labelary renders this command.
Parameters
dStorage deviceoptional · single characterWhich memory device to list: R:, E:, B:, A: or Z:. Z: holds the resident fonts and bar codes.
- Default
- R:
- Invalid value
- not possible — any value is accepted. Measured 2026-08-16:
A:,B:,E:,R:andZ:are printed as given. Any other letter is printed with(INVALID)after the mask, and the listing under it is empty. A mask with no:at all is read asR:. - Test coverage
oObject nameoptional · textName pattern to match. * stands for any run of characters and ? for exactly one.
- Default
- *
- Invalid value
- not possible — any value is accepted. Measured 2026-08-16: the name is upper-cased and cut to sixteen characters, and an empty name is read as
*. The guide's one-to-eight-character limit is not enforced. - Test coverage
xExtensionoptional · textExtension pattern to match. The guide lists .FNT, .BAR, .ZPL, .GRF, .CO, .DAT, .STO, .PNG and * for everything.
- Default
- *
- Invalid value
- not possible — any value is accepted. Measured 2026-08-16: the extension is upper-cased and cut to three characters, and an absent or empty extension is read as
*. - Test coverage
Behavior
The guide's format line reads ~WDd:o.x, but its heading, index entry and examples all
use ^WD. The tilde is a typographical error, and ~WD prints nothing.
The page comes after the format. Measured against Labelary on 2026-08-16:
^XA^FO50,50^A0N,40,40^FDhi^FS^WDR:*.*^XZreturnsX-Total-Count: 2, the label first. A^WDahead of the field keeps that order.- The rows are the objects this request stored before the command ran. One stored later, or one the mask leaves out, is absent.
- A second
^WDprints one page, of the second mask. Each format carrying a^WDprints its own,^PQreplicates the label alone, and a^WDbetween formats prints none.
Each part of the mask has a default — R, * and * — and the whole of it is
upper-cased. The name is cut to sixteen characters, the extension to three, and a device
outside A, B, E, R and Z prints with (INVALID). Rows are alphabetical inside
a double-ruled box, and the last carries Soli Deo gloria..
Known issues
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- Labelary prints the directory label as a page of its own, after the format:
^XA^FO50,50^A0N,40,40^FDhi^FS^WDR:*.*^XZreturnsX-Total-Count: 2, the label first and the page headedDIRECTORY OF R:*.*second (measured 2026-08-16). The guide gives no page count. What the page lists is Labelary's reading too: a printer names what its memory holds and closes with the bytes free, while Labelary has only the objects the request stored for itself, and in place of the bytes-free line the last row carriesSoli Deo gloria.against the right rule. A listing with no rows has nowhere to put that line. The renderer follows Labelary on all of it. — not pinned by a test
zpl.tools against Labelary
Where our output differs from Labelary for the same input. These are the differences that break a migration.
- Labelary lists objects stored by
^DFand^ISbeside those stored by~DG: after^XA^DFR:MYFMT.ZPL^FS^XZits listing namesR:MYFMT.ZPL(measured 2026-08-16). The renderer keeps only~DGgraphics, so those two are absent from its page. The heading, the layout and the~DGrows are the same in both engines. — not pinned by a test
Example
A label followed by a directory listing. Earlier versions of this page showed ^WDR:, ^WDZ: and ^WDB: with no name or extension pattern; the guide's own examples always give one, so this uses R:*.*.
^XA
^FO50,50^A0N,40,40^FDDirectory label follows^FS
^WDR:*.*
^XZ
Related commands
^HWHost Directory ListSends a listing of the objects held in printer memory back to the host.~WCPrint Configuration LabelPrints a label listing the printer's current configuration.^IDImage DeleteDeletes a stored object from printer memory.~DGDownload GraphicDownloads an ASCII-hex bitmap into printer memory as a `.GRF` object.