Page 1 of 1

Closing Open network sessions via batch

Posted: 12 Apr 2011 15:30
by Mitch704
Hi everyone,
I'm trying to write a batch that will close open sessions on my local machine
which values are '0' under 'Open files' tab.
instead of just going:
My Computer > Manage > Shared Folders > Sessions
and manage them myself..

any ideas? Thanks!!


Mitch

Re: Closing Open network sessions via batch

Posted: 13 Apr 2011 09:52
by xl1000
try to use command NET FILE

Code: Select all

NET FILE [id [/CLOSE]]

Re: Closing Open network sessions via batch

Posted: 14 Apr 2011 10:10
by Mitch704
And how do I specify those sessions whose 'open files'=0 ?

thanks

Re: Closing Open network sessions via batch

Posted: 15 Apr 2011 13:34
by xl1000
Having Open Files is something else then Open Sessions...

NET FILE does not show connected sessions.

Check out the command below, or read some info on the Microsoft site about session connections.

Code: Select all

NET SESSTION /?