It's not Perl, but you can find open files using the utilities Handle - from Sysinternals.com Or Oh - from the Windows resource kits
-----Original Message----- From: Dave Roth [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 12:34 AM To: Thomas Berk; Perl-Win32-Admin-Request (E-mail) Subject: RE: Closing open file sessions on a server Both of the attached scripts are from my second book, "Win32 Perl Programming: Administrators Handbook" (http://www.roth.net/books/handbook/). The first one, openfiles.pl, will display all files that have been opened *remotely*. Unfortunately there is no easy way to discover all open file handles locally (nor would you want to since there would literally be hundreds). The other script (closefile.pl) will force closed a given file that has been opened remotely. For both files, pass in "-h" for help. dave -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Berk Sent: Wednesday, February 04, 2004 10:29 AM To: 'Perl-Win32-Admin-Request (E-mail)' Subject: Closing open file sessions on a server Does anybody have an example of how to identify and close open file locks. I have an application that's locking a db file on a Windows 2000 server. Users are inadvertently leaving themselves logged in over night preventing the file from being backed up. I realize that there are risks in clearing these sessions from the server side, but I think the risk of missed backups at least warrants some testing (on something other than the live application db). I've thought of using "net file" and parsing the output to produce "net file" commands to close the sessions. Does anybody have a better idea? Thomas _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
