>yep, file name is fixed.. but renaming is there.. we are copying file from one folder to other & for that using MoveFile.api.. during that I am changing the file name.
Use ADIR(temp,'yourfile')>1 or !empty(SYS(2000,'yourfile')) in stead of file('yourfile'), it's safer. And instead of renaming the files after processing, move them to a subdirectory. The more files you have in a directory, the longer time it takes to check for a file.