The code given below worked well and read the files in my directory and extracted the values:
X <- c(75:85) ; Y <- c(208:215)
extract <- vector()
f
As I mentioned in the comment above, you can use paste to simplify your code a bit. Try:
# set the working directory
setwd("C:New folder (10)")
# construct a vector of file names and loop through
for (f in paste("Climate_Rad_", 1:365, ".img", sep="")) {
conne <- file(f, "rb")
# do rest, assuming it's correct
}