Closing Open network sessions via batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Mitch704
Posts: 2
Joined: 12 Apr 2011 06:03

Closing Open network sessions via batch

#1 Post by Mitch704 » 12 Apr 2011 15:30

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

xl1000
Posts: 10
Joined: 01 Feb 2011 06:10

Re: Closing Open network sessions via batch

#2 Post by xl1000 » 13 Apr 2011 09:52

try to use command NET FILE

Code: Select all

NET FILE [id [/CLOSE]]

Mitch704
Posts: 2
Joined: 12 Apr 2011 06:03

Re: Closing Open network sessions via batch

#3 Post by Mitch704 » 14 Apr 2011 10:10

And how do I specify those sessions whose 'open files'=0 ?

thanks

xl1000
Posts: 10
Joined: 01 Feb 2011 06:10

Re: Closing Open network sessions via batch

#4 Post by xl1000 » 15 Apr 2011 13:34

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 /?

Post Reply