readWindowsShortcut | R Documentation |
Reads a Microsoft Windows Shortcut (.lnk file).
## Default S3 method:
readWindowsShortcut(con, verbose=FALSE, ...)
con |
A |
verbose |
If |
... |
Not used. |
The MIME type for a Windows Shortcut file is
application/x-ms-shortcut
.
Returns a list
structure.
Henrik Bengtsson
[1] Wotsit's Format, http://www.wotsit.org/, 2005.
[2] Hager J, The Windows Shortcut File Format
(as reverse-engineered by), version 1.0.
[3] Microsoft Developer Network, IShellLink Interface, 2018.
https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ishelllinka
[4] Andrews D, Parsing Windows Shortcuts (lnk) files in java,
comp.lang.java.help, Aug 1999.
https://groups.google.com/d/topic/comp.lang.java.help/ouFHsH1UgKI
[5] Multiple authors, Windows shell links (in Tcl), Tcler's Wiki,
April 2008. https://wiki.tcl-lang.org/1844
[6] Daniel S. Bensen, Shortcut File Format (.lnk), Stdlib.com,
April 24, 2009.
https://web.archive.org/web/20110817051855/http://www.stdlib.com/art6-Shortcut-File-Format-lnk.html (was http://www.stdlib.com/art6-Shortcut-File-Format-lnk.html)
[7] [MS-SHLLINK]: Shell Link (.LNK) Binary File Format, Microsoft Inc.,
September 25, 2009.
createWindowsShortcut
() and
filePath()
pathname <- system.file("data-ex/HISTORY.LNK", package="R.utils")
lnk <- readWindowsShortcut(pathname)
# Print all information
print(lnk)
# Get the relative path to the target file
history <- file.path(dirname(pathname), lnk$relativePath)
# Alternatively, everything in one call
history <- filePath(pathname, expandLinks="relative")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.