Quantcast

How to remove directory?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to remove directory?

Xiaobo.Gu
Hi,
It seems file.remove can't remove directories,  regardless whether
it's an empty one, but how to delete a directory in R

> file.remove("D:/ffdata")
[1] FALSE
Warning message:
In file.remove("D:/ffdata") :
  cannot remove file 'D:/ffdata', reason 'Permission denied'
Thanks.
Xiaobo Gu

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to remove directory?

Tom Purucker
unlink("D:/ffdata", recursive = TRUE)

On Fri, Nov 12, 2010 at 6:29 AM, Xiaobo Gu <[hidden email]> wrote:

> Hi,
> It seems file.remove can't remove directories,  regardless whether
> it's an empty one, but how to delete a directory in R
>
> > file.remove("D:/ffdata")
> [1] FALSE
> Warning message:
> In file.remove("D:/ffdata") :
>  cannot remove file 'D:/ffdata', reason 'Permission denied'
> Thanks.
> Xiaobo Gu
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...