Search code examples
rlong-filenames

Expanding short names for non 8dot3 directory paths to long name


In R on Windows, tempdir() returns a path that contains short names for non 8dot3 directory names.

How do I expand those to long names?

An answer that uses pure R code is favorable, but one that uses well-known shell commands used via system() is fine as a backup.


Solution

  • The normalizePath function will turn short names into long names:

    This converts relative paths to absolute paths, and converts short names to long names.