WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:   W13067
Filename:   FileExist Returns Sharing Violation.txt
File Created: 1999:04:15:16:51:32
Last Updated: 1999:04:15:16:51:32