closing a file

  • Thread starter Thread starter SB
  • Start date Start date
S

SB

Hi

Is there a command line I can use to close a file on the server and opened
by users ?

Thanks
 
SB said:
Hi

Is there a command line I can use to close a file on the server and opened
by users ?

Thanks

No. Files are kept in an open condition by applications because they
are in an undefined state. If you close them forcibly (e.g. by a server
reboot) then you get exactly this: an undefined state, with some data
blocks updated, others half updated and others not at all updated.
You could remotely reboot the problem machines - many (but not all!)
applications will close their data files when the application itself is
forcibly closed.
 
You can use the command pskill from sysinternals to close an open file.
 
pskill will not close an open file as such; it will forcibly close
a running process. Any file previously open under this process
would then be in an undefined condition. It could be OK, or
it could be terminally flawed.
 
Sorry I wrote the wrong file down. The command is called PSFile.exe from
sysinternals. It does work well. I use it all the time.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top