The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Linked 0. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Related Articles windows grep equivalent : windows grep equivalent to search text: Find findstr power select-string. Detailed explanation with lots of example for easy understanding change password on Remote desktop : Find out how to change change password on Remote desktop in a easy manner,how to open remote desktop connection and shortcuts also CPU vs Core Vs Socket : Find out what is CPU vs Core Vs Socket, difference and how to find them in windows using different command in easy manner SSH Putty commands : Putty is widely used tool to connect with Linux server..
Of course, it is safer to close the whole process. Exercise caution and judgement. Type in part of the path to the file. The list of processes will appear below. If you prefer command line, Sysinternals suite includes command line tool Handle , that lists open handles.
You can use the Resource Monitor for this which comes built-in with Windows 7, 8, and You can then try to close the application as you normally would, or, if that's not possible, just right-click the handle and kill the process directly from there. Easy peasy! Just be very careful with closing handles; it's even more dangerous than you'd think, because of handle recycling - if you close the file handle, and the program opens something else, that original file handle you closed may be reused for that "something else.
Suppose a search index service has a file open for indexing but has gotten stuck temporarily and you want to delete the file, so you unwisely force the handle closed. The search index service opens its log file in order to record some information, and the handle to the deleted file is recycled as the handle to the log file.
The stuck operation finally completes, and the search index service finally gets around to closing that handle it had open, but it ends up unwittingly closing the log file handle. The search index service opens another file, say a configuration file for writing so it can update some persistent state.
The handle for the log file gets recycled as the handle for the configuration file. The search index service wants to log some information, so it writes to its log file. Unfortunately, the log file handle was closed and the handle reused for its configuration file. The logged information goes into the configuration file, corrupting it. Meanwhile, another handle you forced closed was reused as a mutex handle, which is used to help prevent data from being corrupted.
When the original file handle is closed, the mutex handle is closed and the protections against data corruption are lost. The longer the service runs, the more corrupted its indexes become. Eventually, somebody notices the index is returning incorrect results.
And when you try to restart the service, it fails because its configuration files have been corrupted. You report the problem to the company that makes the search index service and they determine that the index has been corrupted, the log file has mysteriously stopped logging, and the configuration file was overwritten with garbage.
Some poor technician is assigned the hopeless task of figuring out why the service corrupts its indexes and configuration files, unaware that the source of the corruption is that you forced a handle closed.
Try the openfiles command. I've used Handle with success to find such processes in the past. Just to clarify, this is more likely to be a result of misbehaving 3rd party apps not using the CreateFile API call correctly than it is to be anything in Windows itself. Perhaps it's a consequence of the design of CreateFile, but done is done and we can't go back. Basically when opening a file in a Windows program you have the option to specify a flag that allows shared access.
If you don't specify the flag, the program takes exclusive access of the file. Now, if Explorer seems to be the culprit here, it may be the case that that's just on the surface, and that the true culprit is something that installs a shell extension that opens all files in a folder for it's own purposes but is either too gung-ho in doing so, or that doesn't clean up properly after itself.
Symantec AV is something I've seen doing this before, and I wouldn't be surprised if other AV programs were also to blame. Source control plug-ins may also be at fault. So not really an answer, but just some advice to not always blame Windows for what may be a badly written 3rd party program something that can also happen on any other OS which has implicit file locking, but any unix based OS has shared access by default.
On a remote server, when you're checking on a network share, something as simple as the Computer Management console can display this information and close the file. Apropos Explorer holding a file open: "When this happens on a file you need to delete, you have the choice of forcing the handle closed, or rebooting. If this is a one-time thing Explorer does not normally hold this file open then I would guess logging off and logging back on will do the trick. Otherwise, kill the desktop Explorer process and do what you want while it's gone.
First start a copy of cmd. Get answers from your peers along with millions of IT pros who visit Spiceworks. Thanks in advance for any assistance! Best Answer. Shawn Nov 20, at UTC. View this "Best Answer" in the replies below ». Popular Topics in Windows Server.
Spiceworks Help Desk. The help desk software for IT. Track users' IT needs, easily, and with only the features you need. Learn More ». Craig M This person is a verified professional. Verify your account to enable IT peers to see that you are a professional. Craig M wrote: You can use Computer Management and connect to the server that is hosting the file.
Too quick for me :. Steve Nov 20, at UTC.
0コメント