reference:command_reference:internal_commands:print

The Print internal command can be used to:

  • Print photos and other images using the Windows Photo Printing wizard
  • Print supported image files directly
  • Print other files via their registered handlers
  • Generate a folder listing and either print it, save it to a file or copy it to the clipboard
  • Export a folder listing in CSV format for import into Excel, etc.
  • Display a list of installed printers and let you modify the default printer

Command Arguments:

Possible values Description
(no argument) -
- Prints selected files. If only image files are selected (or no files at all are selected), the Windows Photo Printing wizard will be invoked. Non-image files will be printed via their registered print handler.

Example: Print

AS /K
txt Use plain text format when printing a folder to disk or the clipboard.

Example: Print FOLDER TO=clip AS=txt QUIET

csv Use CSV (comma-separated value) format when printing a folder to disk or the clipboard.

Example: Print FOLDER TO /desktop/dirprint.csv AS=csv QUIET

tab Use tab-separated format when printing a folder to disk or the clipboard.

Example: Print FOLDER TO clip AS tab QUIET

AUTOSIZECOLUMNS /K
yes When printing a folder listing to a printer, or as a plain-text file, column widths will be auto-calculated to fit their contents.

Example: Print FOLDER "Brother HL-4050CDN" AUTOSIZECOLUMNS=yes

no Columns will not be autosized - instead the widths from the folder format will be used.

Example: Print FOLDER TO /desktop/dir.txt AS=txt AUTOSIZECOLUMNS=no

CALCSIZES /K
yes Calculate folder sizes when printing a folder.

Example: Print FOLDER TO clip CALCSIZES=yes QUIET

no Do not calculate folder sizes.

Example: Print FOLDER TO clip CALCSIZES=no QUIET

DEFAULTLIST /S
(no value) Displays a generated list of installed printers (acts as a dynamic button). You can use this list to change the default printer, and right-click the items in the list to display the printer's context menu. You can also print a file by dropping it on the generated button for a printer.

Example: Print DEFAULTLIST

ENCODING /K
ansi When printing a folder listing to a file, specifies that ANSI encoding should be used. This is the default encoding type initially, but if the Print Folder dialog is used in interactive mode it will remember the last encoding type manually selected. Using this argument lets you override the last used encoding type.

Example: PRINT FOLDER TO /desktop/dirprint.txt ENCODING=ansi QUIET

utf8 Sets the encoding type to UTF8 with a BOM (Byte Order Mark).

Example: PRINT FOLDER TO /desktop/dirprint.txt ENCODING=bom QUIET

utf8nobom Sets the encoding type to UTF8 without a BOM.

Example: PRINT FOLDER TO /desktop/dirprint.txt ENCODING=utf8nobom

FILTER /K
<filter> Use a filter when printing the contents of sub-folders (via the FLATVIEW argument). This can be the name of a filter you have previously created via the File Operations / Filters page in Preferences, or it can be a simple wildcard pattern to filter by filename.

Example: Print FOLDER FILTER *.jpg FLATVIEW=nofolders QUIET

FILTERDEF /K/R
<filter> Lets you define a filter in text format to filter the contents of sub-folders when printing folder contents. This is similar to the FILTER argument, however the filter does not need to be predefined.

This is a /R argument and so everything after the FILTERDEF keyword will be treated as the argument's value.

Example: Print FOLDER FLATVIEW=nofolders QUIET FILTERDEF name match *.zip and size match > 2 mb

FLATVIEW /K
no Do not print the contents of sub-folders when printing a folder listing.

Example: Print FOLDER FLATVIEW=no QUIET

mixed Prints the contents of sub-folders in "mixed" mode. This mixes files and folders together in a flat list.

Example: Print FOLDER FLATVIEW=mixed TO clip QUIET

nofolders Prints the contents of sub-folders in "mixed - no folders mode". All files from sub-folders are listed, but the folders themselves are not shown.

Example: Print FOLDER FLATVIEW=nofolders QUIET

grouped Prints the contents of sub-folders in "grouped" mode. Files and folders are indented to reflect the tree hierarchy.

Example: Print FOLDER TO /desktop/dirtree.txt FLATVIEW=grouped QUIET

FOLDER /O
(no value) Displays the Print Folder dialog, which lets you print or export the contents of the current folder displayed in the Lister.

Example: Print FOLDER

selected Only selected files in the current folder will be printed by the Print Folder function.

Example: Print FOLDER=selected

<path> Specify the folder path to print.

Example: Print FOLDER /desktop TO clip QUIET

FONT /K
<name>,<size> Specify the font to use when printing to the printer.

Example: Print FOLDER FONT Arial,20 QUIET

FORMAT /K
<format name> Use the specified favorite folder format to control the columns, sort order, and similar details of the printed information.

The named format must first have been created from the Folders / Folder Formats page in Preferences.

Example: Print FOLDER FORMAT="My Format" QUIET

The FORMAT argument also accepts the following special keywords:

  • !current: Use the file display's current format, including any ad-hoc edits made to it.
  • !default: Use the Folder Type format applicable to current folder. For example, Network Drives if it's a network drive.
  • !factory: Use the hardcoded factory-default format.
  • !folder: Use the format for the current folder. This is generally the format you would get when opening the current folder in a new window.
  • !user: Use the User Default format.

Example: Print FOLDER FORMAT=!current QUIET

HEADER /K
top Print a header at the top of each page (or when printing to disk or the clipboard, at the top of the listing).

Example: Print FOLDER HEADER=top QUIET

bottom Print a footer at the bottom of each page (or the bottom of the listing).

Example: Print FOLDER HEADER=bottom QUIET

both Print both a header and a footer.

Example: Print FOLDER HEADER=both QUIET

none Do not print a header or a footer.

Example: Print FOLDER HEADER=none QUIET

HEADING /O
(no value) When used with commands which generate a list of items (see dynamic buttons), the HEADING argument adds a small heading at the start of the list. The heading will be hidden when the list is empty. Headings only happen for commands which potentially generate multiple items at the same level as the button itself.

When HEADING is used by itself, without specifying a text value, the main button's label text is used for the heading.

Example: Print DEFAULTLIST HEADING

<heading text> You can specify the heading text if you want it to be different to the button's label.

Example: Print DEFAULTLIST HEADING="Default Printer"

KEYWORDS /S
(no value) When printing a folder listing, the headings for each column will show keywords (sometimes called "raw names") instead of display names. Keywords uniquely identify each column and do not vary by language, while display names are translated and may not be unique.

Example: Print FOLDER AS=csv TO=clip FLATVIEW=no QUIET KEYWORDS

NOWIZARD /S
(no value) Bypass the Windows Photo Printing Wizard for image files; Opus can natively print any image format that it is able to view.

Example: Print NOWIZARD

QUIET /S
(no value) Print the folder using the specified options without displaying the Print Folder dialog first.

Example: Print FOLDER QUIET

SETDEFAULT /K
<printer name> Set the named printer as the system default printer. The name you provide must be the full name of the printer as shown in the Printers Control Panel. Make sure you enclose the name in quotes if it contains a space.

Example: Print SETDEFAULT "Brother HL-4050CDN"

TO /K
<printer name> Print selected files or folders to the specified printer (overriding the default printer). A button with this command can also accept files dropped on it to print them.

Example: Print TO "Brother HL-4050CDN"

<file name> Print the folder contents to a specified disk file.

Example: Print TO dirlist.txt FOLDER C:\Data QUIET AS txt

clip Print the folder listing to the clipboard.

Example: Print FOLDER TO clip AS csv