Hi.
Does anyone know how to see if a file already is open by another program/computer without locking the file?
tnx for your help.
Printable View
Hi.
Does anyone know how to see if a file already is open by another program/computer without locking the file?
tnx for your help.
Not in a position to test this, but:
Code:If(Dir(FileName) <> "") Then
On Error Goto FileError
Open FileName For Input As #1
'whatever
Close #1
FileError:
Msgbox "File Error - File is in use by another application"
Exit Sub
End If
sorry, that wount do.. I need more controll, I have tested to use:
Open FileName For Binary Access Read Write Lock Read Write As iFileNr
Close iFileNr
and that works pretty good but it takes to much power from the other program that are saving the file to the disk..
There must be a way of reading the flagg of the file.. it must be marked "open" somewhere..