[R] Delete files from R
    Uwe Ligges 
    ligges at statistik.uni-dortmund.de
       
    Tue May 13 13:05:08 CEST 2003
    
    
  
Unternährer Thomas, uth wrote:
> Hi,
> 
> I have a file: d:\foo.txt and want to delete this.
> 
> I tried: 
> system("del d:/foo.txt") works not
> system("notepad d:/foo.txt") works
> 
> Is it possible that I can't delete files or do I have misunderstood something?
> 
> (del is a DOS-command. The "string works" under DOS "\")
> 
> 
> Thanks a lot
> 
> Thomas
> 
Two simple ways:
  file.remove("d:/foo.txt")
and
  shell("del d:\\foo.txt")
Uwe Ligges
    
    
More information about the R-help
mailing list