Dear R-helpers ... any thoughts on the below issue ... will help me complete
a small project!


Strange problem with download.file . for non existent URL an empty file is
created but I am not able to delete the without shutting down R

Example:

> download.file("http://test.com/test.txt","test.txt";)

trying URL 'http://test.com/test.txt'
Error in download.file("http://test.com/test.txt";, "test.txt") : 
  cannot open URL 'http://test.com/test.txt'
In addition: Warning message:
In download.file("http://test.com/test.txt";, "test.txt") :
  cannot open: HTTP status was '404 Not Found'

If you go to working directory through windows explorer, you can see the
empty file test.txt but try deleteting the file and it says that the file is
locked.

I tried closeAllConnections() but of no use.

Any suggestions?

Thanks,
S

______________________________________________
R-help@r-project.org 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 via email to