readWindowsShortcut

0th

Percentile

Reads a Microsoft Windows Shortcut (.lnk file)

Reads a Microsoft Windows Shortcut (.lnk file).

Keywords
file, IO
Usage
# S3 method for default
readWindowsShortcut(con, verbose=FALSE, ...)
Arguments
con

A connection or a character string (filename).

verbose

If TRUE, extra information is written while reading.

...

Not used.

Details

The MIME type for a Windows Shortcut file is application/x-ms-shortcut.

Value

Returns a list structure.

References

[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, 2008. http://msdn2.microsoft.com/en-us/library/bb774950.aspx [4] Andrews D, Parsing Windows Shortcuts (lnk) files in java, comp.lang.java.help, Aug 1999. http://groups.google.com/group/comp.lang.java.help/browse_thread/thread/a2e147b07d5480a2/ [5] Multiple authors, Windows shell links (in Tcl), Tcler's Wiki, April 2008. http://wiki.tcl.tk/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.

See Also

createWindowsShortcut() and filePath()

Aliases
  • readWindowsShortcut.default
  • readWindowsShortcut
Examples
# NOT RUN {
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")
# }
Documentation reproduced from package R.utils, version 2.8.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.