Announcement

Collapse
No announcement yet.

Close open file sessions

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Close open file sessions

    I think questions similar to this have been asked in the past, but I haven't been able to get a solid answer. I have a need to close open file sessions on a server 2008 file server and I can't find a good way to do so. The issue is that I want to close sessions that are in only specific directories, not all open file sessions to the server.

    The reason for this is that we have a legacy application that has data files in these specific directories, which users connect to throughout the day. Sometimes users forget to close their programs when they leave. As a result the developer cannot make changes to the database or compile certain modifications, patches, etc. late at night.

    What I need to do is to automatically have a script (or something else) run at 11:59 PM that will close any open session in those specific directories. Any help would really be appreciated.

  • #2
    Re: Close open file sessions

    Originally posted by dsar View Post
    What I need to do is to automatically have a script (or something else) run at 11:59 PM that will close any open session in those specific directories. Any help would really be appreciated.
    Look into the windows command line tool "openfiles.exe" which is included in Windows by default since I think XP. Part of its output is a path to the file that is open so you could make a batch file that checks for a certain path and then runs the /disconnect switch for the openfiles.exe tool.

    If you need help with that batch file, you'll have to speak with someone like Rems over in the scripting forum.
    Wesley David
    LinkedIn | Careers 2.0
    -------------------------------
    Microsoft Certifications: MCSE 2003 | MCSA:Messaging 2003 | MCITP:EA, SA, EST | MCTS: a'plenty | MCDST
    Vendor Neutral Certifications: CWNA
    Blog: www.TheNubbyAdmin.com || Twitter: @Nonapeptide || GTalk, Reader and Google+: [email protected] || Skype: Wesley.Nonapeptide
    Goofy kitten avatar photo from Troy Snow: flickr.com/photos/troysnow/

    Comment

    Working...
    X