[1] If some application is operating in such a way that it loads a file into memory in its entirety and processes it from there, the original file sitting on the storage device will be freely available as if nothing happened to it. That means you cannot tell by checking the file on the storage device whether a duplicate of it is being used somewhere in the memory by some application. The only hint would be its DateLastAccessed Property.
[2] If some application locks the file and partially load it in the memory due to its size or ownership of it in a multiuser environment, you can check whether the file on the storage device still has a writeable property. It can be done by fso opening it for Appending [opentextfile(thefile,forAppending)] with an error trapping under On Error Resume Next declared. If the process throws an error you can be sure it is being used. Once this error, positive or negative, is monitored, close the file object immediately after.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.