dineshvishe3 (7/25/2013)
Is it possible that there is a lag between when the file is created and when your variable is populated? If so, the file names would be different leading to an error.
[Edit] Just realized that the statement above was not from the original poster. Not sure if the comment relates to the OP's issue or if this is a different request.