According to the Python documentation, os.startfile
takes two arguments: path
and operation
. Path is fairly well described and self-explanatory, but for operation
, all that is said is:
When another operation [(not
'open'
)] is given, it must be a “command verb” that specifies what should be done with the file. Common verbs documented by Microsoft are'print'
and'edit'
(to be used on files) as well as'explore'
and'find'
(to be used on directories).
This implies that other command verbs exist. Are there any other available command verbs? If so, what are they and what do they do?
Specifically, I would like to know the command verb associated with the "Open file location" operation.
Since all startfile
does is basically a call to ShellExecuteW from shell32, this is not really Python-specific.
Microsoft docs indicate that the operations (“verbs”) available in the ShellExecute family of functions depend on the exact system (registry). As per that page, “commonly available verbs” are:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With