Using the ~DY Command to Store Files

Article ID: 94276715

Issue / Question

How to use the ~DY command to store files on a printer

Issue Details

ZPL, store files,  ~DY command, DOS, USB share, .nrd files, HTTPS_CERT, HTTPS_KEY.NRD, certificates, NRD files, COPY command

Applicable To

ZT400 Series, ZT500 Series, QLn Series, ZT200 Series, ZD Series, ZT600 Series, ZQ500 Series

Resolution / Answer

The ZPL ~DY command allows one to store files onto a printer.   Certificates are one type of files that can be stored on a printer.

 
One method that illustrates the usage of the ~DY command with a .NRD file  is illustrated below:

1.  The ~DY command requires one to know the file size of the file that is to be downloaded and saved on the printer,
A method to determine the file size of the file is to use DOS DIRECTORY command (DIR)  as illustrated below:

2.  Create  a txt file with the ~DY command and the following data.

~DYE:HTTPS_CERT,A,NRD,1489,,A



~DYE:               - instructs the printer to store the file in E: memory






~DYE:HTTPS_CERT     - the name of the file (without the extension) to be stored on the printer


~DYE:HTTPS_CERT,A    - the A signifies that the file we be  uncompressed (ZB64,ASCII)



~DYE:HTTPS_CERT,A,NRD     - The "NRD" shows that the file extension on the printer will be ".NRD" in this example




~DYE:HTTPS_CERT,A,NRD,1489,,     - 1489 is the size of the file to be stored as illustrated above.





~DYE:HTTPS_CERT,A,NRD,1489,,A,         - the 'A'  is used with ASCII, hexadecimal or ZB64



EXAMPLE TEXT FILE SHOWN BELOW:  (Note in this example the file created was called "HEADER.TXT"



3.  When this file is then placed into the same folder as the file to be stored, one can use a DOS copy command to send the data to the printer to be stored.

COPY HEADER.TXT + HTTPS_CERT.NRD COM1     
Sending data to the serial port . 



Below is the illustration if one wishes to utilize a USB port with the copy command using a 'share'


in this example the full computer name being used is 80W7-WIN7WIN8.    The computer name is used when sending data to a USB share. 



I can create a 'share' on the USB printer via the windows printer driver  properties as shown below:


Using the same computer name illustrated above I can send the data to the printers USB port
as shown below: 

COPY HEADER.TXT + HTTPS_CERT.NRD  \\80W7-WIN7WIN8\MYQLN


 

+ Applicable Products

  • Kiosk Printers
  • Portfolio & Product
  • Printers
  • QLn Series Healthcare Mobile Printers
  • QLn Series Mobile Printers
  • QLn220 Healthcare
  • QLn220 Mobile Printer
  • QLn320 Healthcare
  • QLn320 Mobile Printer
  • QLn420 Mobile Printer
  • Solutions and Verticals
  • ZD410 Series
  • ZD410-HC
  • ZD410D
  • ZD420 Series
  • ZD420-D-T
  • ZD420-D-T-HC
  • ZD420-HC
  • ZD420C
  • ZD420D
  • ZD420D-HC
  • ZD420T-HC
  • ZD500 Desktop Printer
  • ZD500 Desktop Printer
  • ZD620 Series
  • ZD620-D-T
  • ZD620-D-T-HC
  • ZD620D
  • ZD620D-HC
  • ZD620T
  • ZD620T-HC
  • ZQ500 Series Mobile Printers
  • ZQ510 Mobile Printer
  • ZT200 Series Industrial Printers
  • ZT210 Industrial Printer
  • ZT220 Industrial Printer
  • ZT230 Industrial Printer
  • ZT400 Series Industrial Printers
  • ZT410 Industrial Printer
  • ZT420 Industrial Printer
  • ZT500 Industrial Printers
  • ZT510 Industrial Printer
  • ZT600 Series Industrial Printers
  • ZT610 Industrial Printer
  • ZT620 Industrial Printer