# Undo

The **Undo** internal command can be used to:

* Undo the last undoable file operation (undo delete to recycle bin, etc)
* Undo any one of the previous operations via a menu
* Display a list of undoable operations and undo all or individual operations

**Command Arguments:**

| Argument        | Type | Possible values   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------------- | ---- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| _(no argument)_ | -    | -                 | <p>Undoes the most recent undoable file operation. Not all file operations are undoable - for example, files deleted from network or removable drives can not be undone.</p><p><em>Example:</em> <code>Undo</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>Undo LIST 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>Undo LIST HEADING="Undo List"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ITEM            | /K   | _\<index>_        | <p>Undoes the specified action from the undo list. The <em>&#x3C;index></em> indicates the operation to undo, as displayed in the undo list.</p><p><em>Example:</em> <code>Undo ITEM 3</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| LIST            | /O   | _(no value)_      | <p>Displays a list of undoable actions (acts as a <a href="../../../customize/creating_your_own_buttons/editing_the_toolbar/dynamic_buttons">dynamic button</a>). Any operation from the list can be undone simply by selecting it from the list.</p><p><em>Example:</em> <code>Undo LIST</code></p>                                                                                                                                                                                                                                                                                                                                                 |
|                 |      | **nokeys**        | <p>Disables the automatically-assigned hotkeys that are normally added to the generated list.</p><p><em>Example:</em> <code>Undo LIST=nokeys</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|                 |      | **menu**          | <p>Displays the undo list in a sub-menu.</p><p><em>Example:</em> <code>Undo LIST=menu,nokeys</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| PAGE            | /S   | _(no value)_      | <p>Displays the <em>Undo Log</em> page of the <a href="../../../basic_concepts/the_lister/utility_panel">utility panel</a>. This displays a list of undoable actions, and lets you undo individual operations or all of them.</p><p><em>Example:</em> <code>Undo PAGE</code></p>                                                                                                                                                                                                                                                                                                                                                                     |
