Error in file.exists

I have a code that says

filename <- 09102020
filename_empty <- e09102020

if (file.exists(paste(dirname,filename_empty,sep ="")))
message("Empty file today")
} else if (file.exists(paste(dirname,filename,sep="")))

It isn't actually producing anything. It's not producing the message and it isn't producing the message, nor is it producing the filename.

Is e09102020 supposed to be a character string? If so it needs quotes around it, as does 09102020

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.