R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > fls<-system(paste("ls -r .RData","*",sep=""),intern=TRUE,ignore.stderr=TRUE) > #fls<-".RData2004x08x01x00x45.93Nx090.27Wx00396" > for (j in 1:length(fls)) { + filename<-fls[j] + attach(filename) + xname<-substring(filename,7,nchar(filename)) + dat<-get(xname,pos=2) + write.table(dat,file=paste(xname,".txt",sep=""),col.names=TRUE,row.names=FALSE,sep=" ",append=FALSE) + detach(2) + } > q() > proc.time() user system elapsed 8716.848 62.252 9082.701