Roland
Thu Mar 16 22:54:03 CST 2006
"arno" <rNOSPAMnospam@xs4all.nl> wrote in message
news:f6lj125k5s45dloism4q717bemcd0rtu14@4ax.com...
: I am looking for a (graceful) method to determine if a file is in use
: (i.e., checking if i can delete or move it is *not* an option :) I am
: already using the WMI to obtain a list of directories that I need to
: check for the file (it is the same one for each directory), so perhaps
: I could use that? Anyway, all suggestions are appreciated...
Have you tried setting:
On Error Resume Next
' process file (delete/move)
if err.number > 0 then
' process error
err.clear
end if
On Error Goto 0
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp