Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Issue with Open Files on Windows Server 2003

Posted on 2010-09-20
4
Medium Priority
?
1,153 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

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

972 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