I have so many gz files of the type (filename.nc.gz) where nc stands for
netcdf file.

I used the following commands :

path="C:/Documents and settings/AER/NorthAmerica-West/zipedfiles/" #
examples of zipped files
files <- list.files(path, recursive=TRUE, full.names=TRUE)
files <- grep(".*\\.gz$", files, value=TRUE)

This gave me list of gz files. To unzip (extract it) I used the following
command.
for (flst in 1:length(files)) {

f1<-strsplit(files[flst],"\\.gz")
tmp<-sapply(f1, '[[', 1)
gunzip(tmp)

}

But, this does not work. I have also defined an output path as:

outpath='c:/temp/'
and also used something like this:

sapply(files,function(i) gunzip(i,destname=outpath)

that also did not work. I am frustrated an anything helps - including if
there is any alternative package.

Thank you all for your help.

Best,

Alemu

	[[alternative HTML version deleted]]

