Skip to content

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

6 messages · Mike Prager, Hadley Wickham, Peter Dalgaard +1 more

#
I've run into a problem with dir.create on R2.2.0 Windows XP 2002 SP 2.

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

Both return false and fail to create the directories.

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

Returns true and succesfully creates the directories.

Why does this occur?

Hadley
#
I hope this isn't an insulting question, but does drive D: exist on that 
machine?

Mike

on 12/14/2005 11:09 AM hadley wickham said the following:

  
    
#
Yes, it definitely does!  I'd expect setwd("d:/") to give an error if it didn't

Hadley
#
on 12/14/2005 4:43 PM hadley wickham said the following:
H

Oops.  You are right, of course. 

I checked that on nonexistent drive "Q:" here.  However, it turns out 
that our system administrators have installed a network drive mapped to 
Q:, so it really does exist.

M
#
hadley wickham <h.wickham at gmail.com> writes:
What is the file system? I seem to recall that the top directory of a
(V)FAT drive is somehow special, so setwd'ing to it might put a lock
on it. Not that I know what I'm talking about, but Windows is
notorious for that sort of thing.
#
On Wed, 14 Dec 2005, Peter Dalgaard wrote:

            
Indeed, but only in so far that the directory is non-extensible (e.g. 
limited to 112 files).  I thought it might be that a lock, but it is a 
simple question of sometimes mis-parsing paths with drives in them.