> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/file_operations/copying_moving_and_deleting_files/drag_and_drop.md).

# Drag and drop

Drag-and-drop is a common way of moving files around in Windows. In Opus, drag-and-drop is controlled by the [**File Types**](/directory-opus/manual/file_types.md) system.

### Default drag-and-drop behavior

The default behavior is the same as in Explorer:

* Drag-and-drop of a file to another folder on the same drive will move it
* Drag-and-drop to a folder on a different drive will copy it
* Holding the Shift key when dropping forces the file to be moved
* Holding the Ctrl key when dropping forces it to be copied
* Holding the Alt key when dropping creates a shortcut to the file
* Drag-and-drop with the right button displays a menu that lets you select *Copy*, *Move* or *Create Shortcut* as the action.

Internally, these actions are defined by the items on the **Events** tab for the **All files and folders** file type. Whereas in Explorer these actions are fixed, in Opus they are configurable.

### Configuring drag-and-drop actions

![](https://3597805814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3XSZSwWow0fDf6fQJobd%2Fuploads%2Fgit-blob-959cc624505c8c30df74c4c8c767fbdefde47a6c%2Fdefault_draganddrop.png?alt=media)

This screenshot shows the [File Type editor](/directory-opus/manual/file_types/filetype_editor.md) for the **All files and folders** file type. The events are all defined as some variant of the internal [**Copy**](/directory-opus/manual/reference/command_reference/internal_commands/copy.md) command.

* Drag-and-drop: `Copy MOVEWHENSAME` moves the file on the same drive, and copies it otherwise.
* Drag-and-drop+Alt: `Copy MAKESHORTCUT` makes a shortcut to the file.
* Drag-and-drop+Ctrl: `Copy RENAMEWHENSAME` automatically renames the copied file if the name clashes with an existing one.
* Drag-and-drop+Shift: `Copy MOVE` always moves the file.

Although not shown here, the **Drop Menu** tab also defines the contents of the menu shown when dragging with the right mouse button. This can also be configured.

Editing these functions modifies the drag-and-drop behaviour in Opus. For example, if you wanted drag-and-drop to always copy (rather than moving on the same drive), you could edit the command definition to `Copy RENAMEWHENSAME` (the same as the *Drag-and-drop+*&#x43;trl event).

### Overriding behaviour for specific file types

The **All files and folders** file type is a special file type that by definition matches everything - both files and folders. You can use the File Types system to define overriding events for specific file types. For example, you could configure drag-and-drop of a Zip file to extract the contents of the archive when dropped with the Shift key held down.

See the documentation on the [**File Types**](/directory-opus/manual/file_types.md) system for more information.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/file_operations/copying_moving_and_deleting_files/drag_and_drop.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
