PDA

View Full Version : How to find files being in-use?



Peter Bi
04-11-2002, 05:19 PM
Hi,

We have been tangled by a problem (reboot request after upgrade) and would like to check in our 'bin' directory if there is any file being in use before shut down the service, if there is any, we would like to kill it.

Is there any suggestions on how to do this with ISScript? I couldn't find any built-in function to check files in-use, and kill them.

Thanks,
Peter

mtupps
04-15-2002, 07:42 AM
Hi Peter,

I think this might help, it works for me. I check to see if sqlserver service is active

if (Is(FILE_LOCKED, szServerPath ^ "sqlservr.exe") = TRUE) then
......
else
......
endif;

Hope it helps
Marie