In windows a .Z file remains after downloading even if keepFiles = FALSE
Closed this issue · 0 comments
conradwasko commented
In download.ASCII.file.R, if the OS is not windows des.file.name is renamed (and then subsequently deleted in MakeNetCDF_file.R).
des.file.name = gsub('.Z', '.gz', des.file.name)
But if the OS is windows then there is an additional manipulation using 7zip and the result is a .grid.Z file that is not deleted.
For consistency after Line 22 the .Z file needs to be deleted in download.ASCII.file.R by inserting the second line of code as below:
exitMessage = system(paste0('7z e -aoa -bso0 "',des.file.name, '"'),intern = T)
file.remove(des.file.name)