# Structure of `doublecmd.ext` file

Double Commander's extension file is based on Midnight Commander's 3.0 extension file

All lines starting with # or empty lines are ignored. All actions for file are shown in "Actions" submenu of the file context popup menu.

File format:

    	[extension1|extension2|...|extensionX]
    	Name=Category name
    	Icon=Path to icon
    	action1=command1
    	action2=command2
    	actionX=commandX

Where:

[extension] or [extension1|extension2 ...] — list of extensions (case insensitive!! no regular expressions!!). Also you can use "default" keyword as extension. In this case, if no command is found for sought file type, then the command from this section will be used.

Name — Name of this category (shown in file association manager)

Icon — Path to the icon that will be displayed for this file type in the file panel

Action can be:

- open — used with keypress `Enter` or mouse double click

- view — used with keypress `F3`

- edit — used with keypress `F4`

other actions will show in the "Actions" submenu of the file context popup menu.

Command is any one-line shell command, with a simple macro substitution.

Macros (case sensitive) are:

- `{!VFS}` — for archives — use virtual file system

- `{!EDITOR}` — call editor (internal or external, depends on the configuration)

- `{!VIEWER}` — call viewer (internal or external, depends on the configuration)

- `{!SHELL}` — use system shell (set in configuration) to execute program

- `<?command?>` — executes 'command' in the system shell and feeds the output to the next command

- `%f` — filename

- `%d` — directory

- `%p` — path (directory+filename)

Home