# 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:**

| Argument        | Type | Possible values   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------- | ---- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| _(no argument)_ | -    | -                 | <p>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.</p><p><em>Example:</em> <code>Print</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| AS              | /K   | **txt**           | <p>Use plain text format when printing a folder to disk or the clipboard.</p><p><em>Example:</em> <code>Print FOLDER TO=clip AS=txt QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|                 |      | **csv**           | <p>Use CSV (comma-separated value) format when printing a folder to disk or the clipboard.</p><p><em>Example:</em> <code>Print FOLDER TO /desktop/dirprint.csv AS=csv QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                 |      | **tab**           | <p>Use tab-separated format when printing a folder to disk or the clipboard.</p><p><em>Example:</em> <code>Print FOLDER TO clip AS tab QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| AUTOSIZECOLUMNS | /K   | **yes**           | <p>When printing a folder listing to a printer, or as a plain-text file, column widths will be auto-calculated to fit their contents.</p><p><em>Example:</em> <code>Print FOLDER "Brother HL-4050CDN" AUTOSIZECOLUMNS=yes</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|                 |      | **no**            | <p>Columns will not be autosized - instead the widths from the folder format will be used.</p><p><em>Example:</em> <code>Print FOLDER TO /desktop/dir.txt AS=txt AUTOSIZECOLUMNS=no</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| CALCSIZES       | /K   | **yes**           | <p>Calculate folder sizes when printing a folder.</p><p><em>Example:</em> <code>Print FOLDER TO clip CALCSIZES=yes QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|                 |      | **no**            | <p>Do not calculate folder sizes.</p><p><em>Example:</em> <code>Print FOLDER TO clip CALCSIZES=no QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| DEFAULTLIST     | /S   | _(no value)_      | <p>Displays a generated list of installed printers (acts as a <a href="../../../customize/creating_your_own_buttons/editing_the_toolbar/dynamic_buttons">dynamic button</a>). 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.</p><p><em>Example:</em> <code>Print DEFAULTLIST</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ENCODING        | /K   | **ansi**          | <p>When printing a folder listing to a file, specifies that <strong>ANSI</strong> encoding should be used. This is the default encoding type initially, but if the <em>Print Folder</em> 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.</p><p><em>Example:</em> <code>PRINT FOLDER TO /desktop/dirprint.txt ENCODING=ansi QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|                 |      | **utf8**          | <p>Sets the encoding type to <strong>UTF8</strong> with a BOM (Byte Order Mark).</p><p><em>Example:</em> <code>PRINT FOLDER TO /desktop/dirprint.txt ENCODING=bom QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|                 |      | **utf8nobom**     | <p>Sets the encoding type to <strong>UTF8</strong> without a BOM.</p><p><em>Example:</em> <code>PRINT FOLDER TO /desktop/dirprint.txt ENCODING=utf8nobom</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| FILTER          | /K   | _\<filter>_       | <p>Use a <a href="../../../file_operations/filtered_operations">filter</a> when printing the contents of sub-folders (via the <strong>FLATVIEW</strong> argument). This can be the name of a filter you have previously created via the <a href="../../../preferences/preferences_categories/filtering_and_sorting/filters"><strong>File Operations / Filters</strong></a> page in Preferences, or it can be a simple <a href="../../wildcard_reference/pattern_matching_syntax">wildcard pattern</a> to filter by filename.</p><p><em>Example:</em> <code>Print FOLDER FILTER *.jpg FLATVIEW=nofolders QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| FILTERDEF       | /K/R | _\<filter>_       | <p>Lets you define a filter in <a href="../../textual_filters">text format</a> to filter the contents of sub-folders when printing folder contents. This is similar to the <strong>FILTER</strong> argument, however the filter does not need to be predefined.</p><p>This is a <strong>/R</strong> argument and so everything after the <strong>FILTERDEF</strong> keyword will be treated as the argument's value.</p><p><em>Example:</em> <code>Print FOLDER FLATVIEW=nofolders QUIET FILTERDEF name match *.zip and size match > 2 mb</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| FLATVIEW        | /K   | **no**            | <p>Do not print the contents of sub-folders when printing a folder listing.</p><p><em>Example:</em> <code>Print FOLDER FLATVIEW=no QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|                 |      | **mixed**         | <p>Prints the contents of sub-folders in "mixed" mode. This mixes files and folders together in a flat list.</p><p><em>Example:</em> <code>Print FOLDER FLATVIEW=mixed TO clip QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|                 |      | **nofolders**     | <p>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.</p><p><em>Example:</em> <code>Print FOLDER FLATVIEW=nofolders QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|                 |      | **grouped**       | <p>Prints the contents of sub-folders in "grouped" mode. Files and folders are indented to reflect the tree hierarchy.</p><p><em>Example:</em> <code>Print FOLDER TO /desktop/dirtree.txt FLATVIEW=grouped QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| FOLDER          | /O   | _(no value)_      | <p>Displays the <a href="../../../additional_functionality/print_folder"><strong>Print Folder</strong></a> dialog, which lets you print or export the contents of the current folder displayed in the Lister.</p><p><em>Example:</em> <code>Print FOLDER</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|                 |      | **selected**      | <p>Only selected files in the current folder will be printed by the Print Folder function.</p><p><em>Example:</em> <code>Print FOLDER=selected</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|                 |      | _\<path>_         | <p>Specify the folder path to print.</p><p><em>Example:</em> <code>Print FOLDER /desktop TO clip QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| FONT            | /K   | _\<name>,\<size>_ | <p>Specify the font to use when printing to the printer.</p><p><em>Example:</em> <code>Print FOLDER FONT Arial,20 QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| FORMAT          | /K   | _\<format name>_  | <p>Use the specified favorite folder format to control the columns, sort order, and similar details of the printed information.</p><p>The named format must first have been created from the <a href="../../../preferences/preferences_categories/folders/folder_formats"><strong>Folders / Folder Formats</strong></a> page in Preferences.</p><p><em>Example:</em> <code>Print FOLDER FORMAT="My Format" QUIET</code></p><p>The <strong>FORMAT</strong> argument also accepts the following special keywords:</p><ul><li><strong>!current</strong>: Use the file display's current format, including any ad-hoc edits made to it.</li><li><strong>!default</strong>: Use the Folder Type format applicable to current folder. For example, <strong>Network Drives</strong> if it's a network drive.</li><li><strong>!factory</strong>: Use the hardcoded factory-default format.</li><li><strong>!folder</strong>: Use the format for the current folder. This is generally the format you would get when opening the current folder in a new window.</li><li><strong>!user</strong>: Use the <strong>User Default</strong> format.</li></ul><p><em>Example:</em> <code>Print FOLDER FORMAT=!current QUIET</code></p> |
| HEADER          | /K   | **top**           | <p>Print a header at the top of each page (or when printing to disk or the clipboard, at the top of the listing).</p><p><em>Example:</em> <code>Print FOLDER HEADER=top QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|                 |      | **bottom**        | <p>Print a footer at the bottom of each page (or the bottom of the listing).</p><p><em>Example:</em> <code>Print FOLDER HEADER=bottom QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                 |      | **both**          | <p>Print both a header and a footer.</p><p><em>Example:</em> <code>Print FOLDER HEADER=both QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|                 |      | **none**          | <p>Do not print a header or a footer.</p><p><em>Example:</em> <code>Print FOLDER HEADER=none QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| HEADING         | /O   | _(no value)_      | <p>When used with commands which generate a list of items (see <a href="../../../customize/creating_your_own_buttons/editing_the_toolbar/dynamic_buttons">dynamic buttons</a>), the <strong>HEADING</strong> 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.</p><p>When <strong>HEADING</strong> is used by itself, without specifying a text value, the main button's label text is used for the heading.</p><p><em>Example:</em> <code>Print DEFAULTLIST HEADING</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|                 |      | _\<heading text>_ | <p>You can specify the heading text if you want it to be different to the button's label.</p><p><em>Example:</em> <code>Print DEFAULTLIST HEADING="Default Printer"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| KEYWORDS        | /S   | _(no value)_      | <p>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.</p><p><em>Example:</em> <code>Print FOLDER AS=csv TO=clip FLATVIEW=no QUIET KEYWORDS</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| NOWIZARD        | /S   | _(no value)_      | <p>Bypass the Windows Photo Printing Wizard for image files; Opus can natively print any image format that it is able to view.</p><p><em>Example:</em> <code>Print NOWIZARD</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| QUIET           | /S   | _(no value)_      | <p>Print the folder using the specified options without displaying the <em>Print Folder</em> dialog first.</p><p><em>Example:</em> <code>Print FOLDER QUIET</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| SETDEFAULT      | /K   | _\<printer name>_ | <p>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.</p><p><em>Example:</em> <code>Print SETDEFAULT "Brother HL-4050CDN"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| TO              | /K   | _\<printer name>_ | <p>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.</p><p><em>Example:</em> <code>Print TO "Brother HL-4050CDN"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|                 |      | _\<file name>_    | <p>Print the folder contents to a specified disk file.</p><p><em>Example:</em> <code>Print TO dirlist.txt FOLDER C:\Data QUIET AS txt</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|                 |      | **clip**          | <p>Print the folder listing to the clipboard.</p><p><em>Example:</em> <code>Print FOLDER TO clip AS csv</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
