Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close open files remotely

Status
Not open for further replies.

vijmat

IS-IT--Management
Jun 19, 2001
100
0
0
US
Hello All
I need some help here. Here is the scenario.
We are operating in a Windows 2000 Active directory domain. I am trying to close an open file from a remote location.
For eg if \\server1\share\file.mdb is opened and someone is working on it. I am trying to write a script which will close the file.mdb when executed from my machine.

I checked the resuorce kit and could not find anything which would do this. Please help

Viju Mathai
 
Is this file running on your pc or your server?

If it's your PC is it XP Pro?

If on the server, terminal service in, right-click on the start bar, click "task manager" end service

If on your XP pc, ts in to your server, install "remote desktop client"
Remote into your PC, follow above prompts.

Mike Jones, A+ MCSE
Systems Engineer/Owner
CCNI
 
Hello vijmat,

You can terminate an application (if you execute it with sufficient security privilege). You can take ownership of a data file. But, close a data file is something ambiguous. Sometimes, a data file is loaded leaving not much behind for you to detect it is being loaded in the memory.

regards - tsuji
 
you could use Start->Settings->Control Panel->Administrative Tools->Computer Management

from there Action->Connect to another Computer

connect to the computer that houses the file (not the computer that has it open)

from here
System Tools->Shared Folders->Sessions
OR
System Tools->Shared Folders->Open Files

you can then right click clear session of right click close file

You can do this from any win2k,Xp,2003 workstation or server

Just a word of warning:closing data tables or any file using any form of HARD KILL can and at some point WILL corrupt the file.

Steve Bowman
steve.bowman@ultraex.com

 
This file is running on a server and I am trying to end it from the DOS prompt. I know how to end it from the Computer management.

The problem is I have a very Bad access database which is very critical and is used by some 50 users. This database has a habit of crashing very often. I have to kick out all the users (which is a tedious process) and then repair and compact the database. So I was just thinking of making a script (which any one with admin access can run) which will kick out all active connections to this file and then repair it. So I am looking for a way which can disconnect all connections to this file from the DOS prompt.

I found "Net File" command but i am not sure if it will do it for remote files and again it wants some File ID which is randomly generated. There is another command called "CloseFiles" - I think this is there in Windows 2003. I was unable to get hold of this executable.

If there is any one who had to go through this situation or has any idea how I can do it, please help me.
 
Running an Access db with 50 users is a very bad idea. It's not recommended to have that many people accessing it at once. Switch to your db over to SQL server, and your db crashing problems will be over.
 
I must agree with Serbtastic... in that the capabilities (by design) of Access are being stretched at best and most likely exceeded. I have seen similar problems with 10 or so users accessing Corel Paradox databases (!) .... [hey, if it were up to me, there would be NO Corel...but it's not up to me :( ] and have found no other recourse for closing the files that are open apart from either

a. manually closing each session from the client PC

or

b. rebooting the pc/server providing the file

SQL is most likely the solution. We looked and looked for remote tools to cleanly just close the file and end remote sessions accessing it--which one would think should be simple. Well...that's what you get for thinking!! It does not seem possible, at least not with any conventional tool, remote commands, or registry changes we could find.

Dallas S. Kelsey, III
DKelsey-at-CHGLaw-dot-com
Cox, Hodgman, & Giarmarco, P.C.
Troy MI 48084
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top