//flex table opened by JP

Click to See Complete Forum and Search --> : Disconnecting users from comp management


phantom713
11-11-2003, 04:05 PM
I need to disconnect a large number of users every now and then from a single file that is shared from a server so I can update a program that is shared from that server. I currently disconnect users by going into \ctrl panel\admin tools\comp mgmnt\system tools\shared folders\open files

In the open files folder I found that I can only select and disconnect 1 user at a time (without disconnecting everyone from everything which I can’t)

Does anyone know a way do disconnect users from a file from a command line? I could script the disconnect then.

Any help is appreciated!
Thanks,

Joe

rraehal
11-11-2003, 07:20 PM
Deleting the share and recreating it will disconnect all the users at once.

J/K

You can use this command, but it closes every thing:
for /f "skip=4 tokens=1" %a in ('net files') do net files %a /close

"net files filename.ext /close" may close a single file. You can get help by running CMD and typing "net files /?". filename.ext may need to be the systems id number for the open file. You should be able to get this from the command line by typing "net files" and pressing return. You may need to do a "| more" on the end to view all the files.

This is the same as right clicking in the open files area and right clicking and selecting close all open files. It does not close the files on the users computer. It may just return an error.