Solved

Issue with Open Files on Windows Server 2003

Posted on 2010-09-20
4
1,118 Views
Last Modified: 2012-05-10
I have an issue that I want to see if anyone would have a good solution for.

I have a client with a Windows 2003 File Server.  They have a user who comes in earlier then most users and has to access files for various tasks and reports.  Many mornings he gets the error that some files are in use and he can only access in read only mode.  Most times this is a file that was left open by another user before they went home the day before and not in the building so he must wait for them to arrive.  I'm trying to find a way that this user would have master rights where if another user has it open he could take it over in full control.  Kind of like how an admin can go on to the server and close files out which is what we do for him if the user isn't in the office.  I'm not sure if this is possible or not but thought I'd see if anyone out there has had an issue like this.  


Thanks.
0
Comment
Question by:bobohost
  • 3
4 Comments
 
LVL 1

Expert Comment

by:Malhovic
ID: 33720581
Pretty much the only option is to close the session on that file through the file server that I know of. I haven't run across any other method so if there is one i'd love to know about it.
0
 
LVL 6

Author Comment

by:bobohost
ID: 33720723
0
 
LVL 6

Accepted Solution

by:
bobohost earned 0 total points
ID: 34232123

If you are using Windows 2003 or XP then you can utilize command line utility called "OpenFiles"
"OpenFiles" command enables an administrator to list or disconnect files and folders that have been opened on a system.

To test follow these steps
Click Start -> Run -> Cmd.exe
OpenFiles [press enter]

Now above command will show you the list of files/folders that are opened. The output will be like
INFO: The system global flag 'maintain objects list' needs
      to be enabled to see local opened files.
      See Openfiles /? for more information.

Files opened remotely via local share points:
---------------------------------------------

ID       Accessed By          Type       Open File (Path\executable)
======== ==================== ========== =====================================
163      ADMINISTRATOR        Windows    C:\..\Desktop\MyDoc\Test1.doc

To disconnect you can use File ID, UserName, or file name Like

OpenFiles /Disconnect /ID 163
OR
OpenFiles /Disconnect /A Administrator

If you want to close all opened files then can utilize FOR loop. Like:

FOR /F "skip=11 Tokens=1" %I IN ('OpenFiles') DO OpenFiles /Disconnect /ID %I

Above statement will close all files/folders that are opened. You can also make a batch file and schedule it so it will automatically close all files on specified time.

Hope this helps!
Farhan
0
 
LVL 6

Author Closing Comment

by:bobohost
ID: 34272750
Found solution from another post on EE
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question