Hello, again. Try to use the values in 'listfile' directly:
# Wrong!!! for(h in length(listfile)) # Just last value ?!? {b=file.info(listfile[h])$size/67420/4 wind <- file(listfile[h]), "rb") # Parenthesis do not match. # Right for(h in listfile) {b=file.info(h)$size/67420/4 wind <- file(h, "rb") Also: In the final lines, see the help pages ?sprintf ?writeBin sprintf("C:\\Users\\aalyaari\\Desktop\\New folder (6)\\Yar_%00d.bin", d) # Should be Yar_%02d writeBin(as.integer(tm@x), size=2,to.write) # Arg 'con' is the 2nd, not 3rd. Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/Min-Max-tp4593065p4598374.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.