[Rd] Writing files with long paths on Windows fails even after enabling long paths

Kenny Bell kmbe||56 @end|ng |rom gm@||@com
Wed Jul 24 08:43:41 CEST 2019

Hello all,

We now can have long file paths on Windows by setting the LongPathsEnabled
key to 1 at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
in the Registry Editor. I can successfully rename files to have long paths
in File Explorer.

R still isn't able to take advantage of the change, however:

write(1, paste0(paste(sample(letters, 265, TRUE), collapse = ''), '.txt'))
#> Warning in file(file, ifelse(append, "a", "w")): cannot open file
#> No such file or directory
#> Error in file(file, ifelse(append, "a", "w")): cannot open the connection

I have read that long paths will be enabled by default in some future
release of Windows.

Hope this helps,

	[[alternative HTML version deleted]]

More information about the R-devel mailing list