zpl.tools
Host status and queries

^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.x

Support

Supportedparsed: full · state: full · rendered: full

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 character

Which 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: and Z: 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 as R:.
Test coverage
oObject nameoptional · text

Name 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 · text

Extension 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:*.*^XZ returns X-Total-Count: 2, the label first. A ^WD ahead 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 ^WD prints one page, of the second mask. Each format carrying a ^WD prints its own, ^PQ replicates the label alone, and a ^WD between 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:*.*^XZ returns X-Total-Count: 2, the label first and the page headed DIRECTORY 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 carries Soli 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 ^DF and ^IS beside those stored by ~DG: after ^XA^DFR:MYFMT.ZPL^FS^XZ its listing names R:MYFMT.ZPL (measured 2026-08-16). The renderer keeps only ~DG graphics, so those two are absent from its page. The heading, the layout and the ~DG rows 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

Open in viewer