The FileType internal command can be used to:
Command Arguments:
Argument |
Type |
Possible values |
Description |
---|---|---|---|
ACTION |
|
<event> |
Trigger a file-type-defined event for the selected files. For example,
you could use this to trigger the drag-and-drop event for a file from a
button or hotkey. This is the default argument for the
FileType command - you do not need to specify the
ACTION keyword. |
CONTEXTFORCE |
/S |
(no value) |
When used with the CONTEXTMENU argument, this
overrides the Hide Windows items on file context
menus option on the Miscellaneous / Windows
Integration page in
Preferences. |
CONTEXTMENU |
/O |
(no value) |
Displays the standard system context menu for the selected files and
folders (acts as a dynamic
button). This lets you embed the context menu in a drop-down menu
(used in the default File menu, for example). You could also use this in
conjunction with the CONTEXTFORCE option to shunt the
full Windows context menu into a sub-menu of the normal context
menu. |
|
|
<GUID> |
Displays any context menu items added by the specified context menu
extension. This gives you the ability (in conjunction with
the Hide Windows items on file context menus option)
to control exactly which context menu items are shown on your context
menu. You need to know the GUID for the context menu extension in
question, and finding that out is beyond the scope of this help file -
instead, see this article on the Opus Resource Centre for an example
of how this might be used. |
|
|
<file class> |
Displays any context menus for the specified file class. This gives you
the ability (in conjunction with the Hide Windows items on
file context menus option) to control exactly which context menu
items are shown on your context
menu. |
CONTEXTOPTIONS |
/K |
INCLUDE=<type> |
When used in conjunction with CONTEXTMENU
Directory\Background, this lets you include specific file types
(and exclude all others) from the generated shell New menu that
is added. Note that you must enclose the value in quotes, as it contains
an equals sign that would otherwise confuse the command
parser. |
|
|
EXCLUDE=<type> |
Exclude the specified file types from the generated shell New
menu when used with CONTEXTMENU
Directory\Background. You can also use * to
totally disable the New menu in this
context. |
EDIT |
/S |
(no value) |
Displays the File Type
editor for the file type corresponding to the selected file. You
could add this command to the context menu for All Files and Folders
to enable you to quickly edit the file type definition for any
file. |
FILE |
/K/M |
<filename> ... |
Specify the filename or names to perform the file type action on. If
not specified, all selected files in the current source folder will be
used. |
FROMCLIPBOARD |
/O |
(no value) |
Use in conjunction with the NEW argument to create one
or more new files with names drawn from the clipboard contents. This is
designed to be step two of a two-part operation; the first part being
copying the names of one or more files to the clipboard with the
Clipboard
COPYNAMES command. |
|
|
keepext |
Specify this argument to preserve the file extensions of the files on
the clipboard. |
NEW |
/K |
<file type> |
Create a new file of the specified type. This is equivalent to
selecting the appropriate item from the New context menu. Only
files that have a registered "new" handler can be created in this manner -
so if a file type doesn't appear in the New context menu you
won't be able to create one with this command. Use the
NEWNAME argument to modify the default name of the new
file. The FileType NEW command automatically sets a variable called newfile to the name of the newly created file. To insert the variable, use {$newfile}. |
NEWMENU |
/S |
(no value) |
Displays the shell New menu, that lets you create new files of
various types by selecting the appropriate item from the menu (acts as a
dynamic button). This
lets you embed the New menu in a drop-down
menu. |
NEWNAME |
/K |
<new filename> |
Specifies the filename when creating a new file via the
NEW argument. If you don't specify the name, a default
filename is used. By default, when a new file is created Opus will
initiate inline rename on the new item allowing you to rename it. If you
want to specify your own filename and prevent the inline rename behaviour,
prefix your filename with the norename:
string. |
OPENWITHMENU |
/S |
(no value) |
Displays the shell Open With menu, that lets you choose the
program to open selected files with (acts as a dynamic button). This lets you embed the
Open With menu in a drop-down
menu. |
PATH |
/K |
<path> |
Use this in conjunction with the NEW argument to
create a new file in a location other than the current source file
display. Note that when you use this argument the newly created file will
not be put into inline rename mode automatically. |
SENDTOMENU |
/S |
(no value) |
Displays the shell Send To menu, that lets you send selected files and
folders to various programs and destinations (acts as a dynamic
button). |
|
|
nosub |
By default the Send To menu is displayed as a sub-menu; by adding
the nosub value the items within the Send To
list will be added directly to the toolbar or drop-down menu
containing the FileType SENDTOMENU
command. |
|
|
shift |
Forces the Send To menu to be built as if the Shift
key were held down. On some versions of Windows an extended menu is shown
when Shift is held. |