Hi,
We would like to detect if the file is locked before we move the file
We use code like :
if (systemio::filelock(filename))
ok = checkedfail("filelock error");
else
info("file is not locked");
The most files is no problem and showing "file is not locked"
However, for some files, I get the error message
unhandled clr exception occurred
Exception has been thrown by the target of an invocation.
The process cannot access the file XXX because it is being used by another process.
I try to write a job to open a file, and use this filelock() function to test it and
It did show the message("file is locked");
so i don't know how to re-produced it in test environment for this exception and how to modify the code
Can you experts provide me some advises it would be appreciated.!
Quatrani
*This post is locked for comments
I have the same question (0)