# CreateFolder

The **CreateFolder** internal command is used to:

* [Create new folders](../../../file_operations/creating_folders) (either via a dialog, an inline rename field in the file display, or with a pre-determined name)
* [Create new archive files](../../../file_operations/creating_archives)
* Create new [libraries](../../../basic_concepts/virtual_file_system/libraries), [collections](../../../basic_concepts/virtual_file_system/file_collections) and [stored query collections](../../../basic_concepts/virtual_file_system/file_collections/stored_queries)

**Command Arguments:**

| Argument         | Type | Possible values        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------- | ---- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ARCHIVE          | /O   | _(no value)_           | <p>Create a new archive file. The archive format will default to .zip but can be changed via the dialog.</p><p><em>Example:</em> <code>CreateFolder ARCHIVE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|                  |      | _\<archive format>_    | <p>Create a new archive file of the specified format.</p><p><em>Example:</em> <code>CreateFolder ARCHIVE=.7z</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ARCHIVEARGS      | /K   | _\<archive arguments>_ | <p>Used to pass format-specific arguments when creating an archive. The format these arguments take is defined by the plugin and archive type in question - currently, none of the standard archive formats Opus supports make use of this.</p><p><em>Example:</em> <code>CreateFolder ARCHIVE=.moo ARCHIVEARGS="/compression=1"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ASK              | /S   | _(no value)_           | <p>If you specify a name with the <strong>NAME</strong> argument the <em>Create Folder</em> dialog does not normally display; instead the folder is created immediately. You can add the <strong>ASK</strong> argument to force the dialog to display, pre-populated with the specified name.</p><p><em>Example:</em> <code>CreateFolder "My New Folder" ASK</code></p><p>If the specified name already exists before the prompt is displayed, it will have a number appended to it automatically so that is unique, similar to the way <strong>CreateFolder</strong> without any arguments will prompt to create <em>New Folder</em> and then <em>New Folder (2)</em>, <em>New Folder (3)</em>, and so on.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| COLLQUERY        | /S   | _(no value)_           | <p>Creates a stored query collection rather than a regular file collection. This only has effect when actually creating a collection (because, for example, you are in the File Collections root folder at the time).</p><p><em>Example:</em> <code>CreateFolder COLLQUERY</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| FROMCLIPBOARD    | /O   | _(no value)_           | <p>Uses the text currently on the clipboard for the name of the new folder. Equivalent to <code>CreateFolder "{clip}"</code>.</p><p><em>Example:</em> <code>CreateFolder FROMCLIPBOARD</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|                  |      | **multi**              | <p>Creates multiple folders from the clipboard contents, assuming the clipboard contains multiple lines of CR/LF separated text. Without this keyword only the first line would be used.</p><p><em>Example:</em> <code>CreateFolder FROMCLIPBOARD=multi</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| INLINE           | /S   | _(no value)_           | <p>Creates a new folder and lets you edit its name inline (in the file display) - equivalent to selecting <em>New -> Folder</em> from the context or File menu.</p><p><em>Example:</em> <code>CreateFolder INLINE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| NAME             | /M   | _\<folder name> ..._   | <p>Specify the name of the folder or archive to create. If this argument is supplied Opus will not prompt for a name (unless <strong>ASK</strong> is also specified). You can specify a full path, or just the folder name to create the folder in the current source directory. You can also specify multiple names to create more than one folder at once.</p><p>This is the default argument for the <strong>CreateFolder</strong> command, so the keyword <strong>NAME</strong> does not need to be specified. However, if you need to create a folder whose name is one of the other argument names, you must use the more explicit <strong>NAME="xyz"</strong> form to avoid the <em>xyz</em> part being interpreted as an argument name instead of a folder name. If you need this while creating multiple folders, you can specify the <strong>NAME</strong> argument multiple times.</p><p><em>Example:</em> <code>CreateFolder "Folder 1" "Folder 2" "Folder 3"</code><br><em>Example:</em> <code>CreateFolder "C:\Program Files\My New Program"</code><br><em>Example:</em> <code>CreateFolder NAME="Apple" NAME="Ask" NAME="Inline" ASK</code></p> |
| NOSEL            | /S   | _(no value)_           | <p>Normally when a folder is created in the currently displayed directory it is selected, and the display scrolled if necessary to make it visible. The <strong>NOSEL</strong> argument prevents this.</p><p><em>Example:</em> <code>CreateFolder "New Folder" NOSEL</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| NOUPDATESETTINGS | /S   | _(no value)_           | <p>Prevents settings made by this command from becoming the new defaults. For example, if you specify the <strong>READAUTO</strong> argument, the value you provide will become the new default setting for the CreateFolder command unless you also specify <strong>NOUPDATESETTINGS</strong>.</p><p><em>Example:</em> <code>CreateFolder "{date|yyyyMMdd}" READAUTO NOUPDATESETTINGS</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| MULTI            | /O   | _(no value)_           | <p>Ensures the <em>Create Folder</em> is in multiple-folder mode if it opens.</p><p>If <strong>MULTI</strong> is not specified at all, the dialog remembers its previous mode (subject to <strong>NOUPDATESETTINGS</strong>) when no folder names are specified on the command line, uses single-folder mode when one name is specified, and uses multi-folder mode when multiple names are specified.</p><p><em>Example:</em> <code>CreateFolder "Backup on {date|yyyy_MM_dd}" ASK MULTI</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|                  |      | **no**                 | <p>Ensures the <em>Create Folder</em> dialog is in single-folder mode if it opens.</p><p><em>Example:</em> <code>CreateFolder MULTI=no</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| READAUTO         | /O   | _(no value)_           | <p>Automatically read the newly created folder into the current source file display.</p><p><em>Example:</em> <code>CreateFolder "New Folder" READAUTO</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|                  |      | **no**                 | <p>Do not automatically read the newly created folder.</p><p><em>Example:</em> <code>CreateFolder "New Folder" READAUTO=no</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|                  |      | **dual**               | <p>Read the newly created folder into the other file display. If the Lister is not currently in <a href="../../../basic_concepts/the_lister/dual_display">dual-display</a> mode it will be placed in this mode first. You can combine this value with <strong>tab</strong> to open a new tab in the other file display.</p><p><em>Example:</em> <code>CreateFolder "New Folder" READAUTO=dual</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|                  |      | **left**               | <p>Read the newly created folder into the left (or top) file display, regardless of which side is active. You can combine this value with <strong>tab</strong> to open a new tab.</p><p><em>Example:</em> <code>CreateFolder "Stuff" READAUTO=left,tab</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|                  |      | **right**              | <p>Read the newly created folder into the right (or bottom) file display, regardless of which side is active. If the Lister is not currently in <a href="../../../basic_concepts/the_lister/dual_display">dual-display</a> mode it will be placed in this mode first. You can combine this value with <strong>tab</strong> to open a new tab in the other file display.</p><p><em>Example:</em> <code>CreateFolder "My Dir" READAUTO=right</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|                  |      | **tab**                | <p>Create a new tab for the newly created folder. The tab will be opened in the source file display unless <strong>dual</strong>, <strong>left</strong>, or <strong>right</strong> is also specified.</p><p><em>Example:</em> <code>CreateFolder "New Folder" READAUTO=dual,tab</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|                  |      | **nofocus**            | <p>When opening a new tab, prevents that tab from being made the active one.</p><p><em>Example:</em> <code>CreateFolder "New Folder" READAUTO=tab,nofocus</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ZIP              | /S   | _(no value)_           | <p>Create a new Zip file (equivalent to <code>CreateFolder ARCHIVE=.zip</code>).</p><p><em>Example:</em> <code>CreateFolder ZIP</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
