Skip to content

Problem with dir.create (R2.2.0 Windows XP 2002 SP 2)

2 messages · Liaw, Andy, Brian Ripley

#
No problem for me (Version 2.2.0  (2005-10-06 r35749), WinXPPro SP2):
[1] TRUE
[1] TRUE

Andy

From: hadley wickham
#
One comment is that Windows does not like trailing directory separators as 
in

print(dir.create("d:\\otis-sim\\", recursive=T))

and so this will give a warning as in
[1] FALSE
Warning message:
'd:\otis-sim\' already exists

Beyond that, the code is designed for Unix-like file systems and does not 
expect drives.

setwd("d:/")
print(dir.create("\\otis-sim\\foo", recursive=T))

seems to work reliably.  The issue seems to depend on what the current 
directory on the drive is (if a drive is specified), and I've made an 
adjustment for 2.2.1 to workaround that.
On Wed, 14 Dec 2005, Liaw, Andy wrote: