windows/shell.exec: Open a File or URL using Windows File Associations

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Opens the specified file or URL using the application specified in the Windows file associations.

Usage

1

Arguments

file

file or URL to be opened.

Details

The path in file is interpreted relative to the current working directory.

R versions 2.13.0 and earlier interpreted file relative to the R home directory, so a complete path was usually needed.

Encoded file:// URLs should be in the Windows standard form, e.g. "file:///c:/path/to/file.txt".

Value

No value, but informative error messages will be given if the operation fails.

Author(s)

B. D. Ripley and Duncan Murdoch

See Also

system, shell

Examples

1
2
3
4
5
6
7
## Not run: 
## the space should not be encoded here
shell.exec("C:\\Program Files\\BreezeSys\\BreezeBrowser\\Breezebrowser.htm")
shell.exec("C:/Program Files/BreezeSys/BreezeBrowser/Breezebrowser.htm")
shell.exec("file:///C:/Program Files/BreezeSys/BreezeBrowser/Breezebrowser.htm")

## End(Not run)

robertzk/monadicbase documentation built on May 27, 2019, 10:35 a.m.