readWindowsShortcut {R.utils}R Documentation

Reads a Microsoft Windows Shortcut (.lnk file)

Description

Reads a Microsoft Windows Shortcut (.lnk file).

Usage

## Default S3 method:
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.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

References

[1] Wotsit's Format, http://www.wotsit.org/, 2005.

See Also

filePath

Examples

filename <- system.file("data-ex/HISTORY.LNK", package="R.utils")
lnk <- readWindowsShortcut(filename)

# Print all information
print(lnk)

# Get the relative path to the target file
history <- file.path(dirname(filename), lnk$relativePath)

# Alternatively, everything in one call
history <- filePath(filename, expandLinks="relative")

file.show(history)


[Package R.utils version 0.7.7 Index]