FileExist Returns Sharing Violation
Keywords: FileExist File Exist article
Problem:
FileExist returns "2" if the specified file exists but is currently open by another application in read deny mode. If you try to access this file using (most of) the other "File..." functions, it will cause a sharing violation.
The solution is to use the FileItemize function instead, as in:
If FileItemize(filename) == "" Then ...
Article ID: W13067Filename: FileExist Returns Sharing Violation.txt