Displaying 1 result from an estimated 1 matches for "ucscfilenames".
2011 Nov 08
2
download.file
...ile if the download function has non
zero value.
Now it exits when there is an error or file not present. How can I use
"try" and "if" condition together so that the program does not exit on
error and delete the created file in destination folder.
for (i in 1: 100)
{
fileUrl = ucscfilenames[i]
if (download.file(fileUrl, destFile, 'wget' , quiet = TRUE) != 0)
{
file.remove(destFile)
}
}
thanks
--
-------------
Mary Kindall
Yorktown Heights, NY
USA
[[alternative HTML version deleted]]