# External control codes

The external control codes are used to pass information like the names of selected files to external programs. For example, the command **notepad.exe {f}** would launch Notepad, and pass the name of the first selected file as an argument on its command line.

External control codes can (despite the name) also be used with the internal commands. For example, the command **CreateFolder {date|yyyyMMdd}** will create a new folder automatically named after the current date.

Most control codes have both a short and a long form. The short form requires less typing and produces a smaller function definition, while the long form is more descriptive and may make the function more understandable. Note that, unlike the arguments for internal commands, the external control codes are case-sensitive.

See the page on [passing files to external programs](https://chaoses-ib.gitbook.io/directory-opus/manual/customize/creating_your_own_buttons/passing_files_to_external_programs) for more information about the external control codes.

More:

[Codes for passing filenames](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/external_control_codes/codes_for_passing_filenames)\
[Codes for passing paths](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/external_control_codes/codes_for_passing_paths)\
[Codes to display dialogs](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/external_control_codes/codes_to_display_dialogs)\
[Codes for date and time](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/external_control_codes/codes_for_date_and_time)\
[Codes for clipboard and variables](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/external_control_codes/codes_for_clipboard_and_variables)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/external_control_codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
