<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx</link><description>Hey, Scripting Guy! Is there a way to export the information found in the Shared Folders portion of the Computer Management snap-in (in particular, the list of sessions and the list of open files)? -- PP 
 Hey, PP. Funny you should ask; this very issue</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3569667</link><pubDate>Mon, 29 Apr 2013 14:49:18 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3569667</guid><dc:creator>Rick</dc:creator><description>&lt;p&gt;Perfect, I&amp;#39;ve been looking for a way to list not only the username associated with the &amp;quot;file share&amp;quot; connection but the computer (or IP), even from remote file servers. I&amp;#39;ve tried this for file shares on Windows 2003,2008,2012,XP,7 and even a high end EMC NAS filer. Works like a charm. &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3569667" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3519497</link><pubDate>Tue, 11 Sep 2012 19:48:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3519497</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Thanks for all the great examples. &amp;nbsp;Is there any way to do this for local fiiles only? (i.e. I want to get a list of all files that are open on the Windows desktop where the script is running). &amp;nbsp;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3519497" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3473562</link><pubDate>Sun, 01 Jan 2012 15:06:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3473562</guid><dc:creator>Eliyas L</dc:creator><description>&lt;p&gt;Hey JV, Thank you for your prompt reply :)&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;EL&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3473562" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3473550</link><pubDate>Sun, 01 Jan 2012 07:08:04 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3473550</guid><dc:creator>JV</dc:creator><description>&lt;p&gt;@Elias - this cannot be done with scripting. &amp;nbsp;You need to use the low-level API or OH.EXE from the resource kit.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3473550" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3473548</link><pubDate>Sun, 01 Jan 2012 05:24:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3473548</guid><dc:creator>Eliyas L</dc:creator><description>&lt;p&gt;Hey, Scripting Guy!, Happy New Year :)&lt;/p&gt;
&lt;p&gt;For Open Files script I would like to know whether there is a way to get Open Files for specific folder rather than all the folder which are shared?&lt;/p&gt;
&lt;p&gt;Please help as I am new to VB but cant figure out how to do it..if you can redirect me to anyother link would be appreciated. Thank you!! &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;EL&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3473548" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3458431</link><pubDate>Tue, 11 Oct 2011 12:03:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3458431</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@stanley the Net* commands are always a good solution -- they are easy to use, powerful, and always available. Great suggestion.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3458431" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3458357</link><pubDate>Tue, 11 Oct 2011 04:00:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3458357</guid><dc:creator>Stanley Tsui</dc:creator><description>&lt;p&gt;I use the good old &amp;quot;NET FILE &amp;quot; CLI command to replace the &amp;quot;Remove&amp;quot; method. &amp;nbsp;Tested ok on a 2003 R2 server.&lt;/p&gt;
&lt;p&gt;Set objShell = WScript.CreateObject(&amp;quot;WScript.Shell&amp;quot;) &amp;nbsp; &lt;/p&gt;
&lt;p&gt;Set objConnection = GetObject(&amp;quot;WinNT://atl-ws-01/LanmanServer&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set colResources = objConnection.Resources&lt;/p&gt;
&lt;p&gt;For Each objResource in colResources&lt;/p&gt;
&lt;p&gt; &amp;nbsp;strResName = &amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;intLock = 0&lt;/p&gt;
&lt;p&gt; &amp;nbsp;On Error Resume Next&lt;/p&gt;
&lt;p&gt; &amp;nbsp;strResName = objResource.Name&lt;/p&gt;
&lt;p&gt; &amp;nbsp;intLock = objResource.LockCount&lt;/p&gt;
&lt;p&gt; &amp;nbsp;On Error Goto 0&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if intLock &amp;lt;&amp;gt; 0 Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strCommand = &amp;quot;net file &amp;quot; &amp;amp; strResName &amp;amp; &amp;quot; /close&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;objResult = objShell.Run(strCommand, 1, True)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt;Next&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3458357" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3392595</link><pubDate>Tue, 08 Mar 2011 19:08:09 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3392595</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;How can this be done using powershell?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3392595" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3381774</link><pubDate>Fri, 21 Jan 2011 18:30:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3381774</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I am getting this error message too &amp;quot;Active Directory: Not implemented&amp;quot; when i try to run the script for deleting open files.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3381774" width="1" height="1"&gt;</description></item><item><title>re: How Can I List Open Sessions and Open Files on a Computer?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/16/how-can-i-list-open-sessions-and-open-files-on-a-computer.aspx#3381480</link><pubDate>Thu, 20 Jan 2011 14:51:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3381480</guid><dc:creator>dieter</dc:creator><description>&lt;p&gt;sometimes it&amp;#39;s wrong to free up resources without closing the applications&lt;/p&gt;
&lt;p&gt;what can do if i want to know about the sessions holding file-locks (in order to stop the application at the client side)&lt;/p&gt;
&lt;p&gt;i search for a workflow like this &amp;nbsp; get the open resource &amp;nbsp;==&amp;gt; get the corresponding session ==&amp;gt; get the computername for this session and then stop the application&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3381480" width="1" height="1"&gt;</description></item></channel></rss>