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")
Run the code above in your browser using DataLab