4 ms·
Though it might finally do away with the ever-persisting Windows error messages about "this file is already open" followed by a search through all of the proces
by Gladdyu 8y ago
Though it might finally do away with the ever-persisting Windows error messages about "this file is already open" followed by a search through all of the processes that might have it open to terminate the offender.
- otterley 8y agoThat error is orthogonal to the filesystem in use. Every OS that provides exclusive locking, regardless of filesystem, will return an error if more than one process wants to acquire such a lock.
- reitanqild 8y ago> Every OS that provides exclusive locking, regardless of filesystem, will return an error if more than one process wants to acquire such a lock. Obviously. The super annoying thing is when the OS doesn't try to tell you which process(es) keeps it open and doesn't even ship with built in tooling to let you find out on your own. I think that is the point GP tries to make.
- Negitivefrags 8y agoOpen up "Resource Monitor" and go to the "Disk" tab. Under "Disk Activity" you can see all open file handles.
- coldtea 8y agoWhich are thousands...
- psykotic 8y agoYou need the Sysinternals utilities to make life tolerable: https://docs.microsoft.com/en-us/sysinternals/downloads/handle https://docs.microsoft.com/en-us/sysinternals/downloads/hand... from the command line or Ctrl-F in https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer https://docs.microsoft.com/en-us/sysinternals/downloads/proc... if you prefer a GUI. They do a brute-force search over the open handles in all processes, but it's effective.
- noisem4ker 8y agoI prefer this utility: http://www.emptyloop.com/unlocker/ http://www.emptyloop.com/unlocker/ It lets you see which process locked a file, and optionally remove the lock.
- kevin_thibedeau 8y agoCertainly not a sensible solution like having a dialog button that gives you all the relevant information immediately and empowers you to solve the problem without a goose chase.
- deleted 8y ago[deleted]
- tracker1 8y agoPS> $lockedFile="C:\Windows\System32\wshtcpip.dll" PS> Get-Process | foreach{$processVar = $_;$_.Modules | foreach{if($_.FileName -eq $lockedFile){$processVar.Name + " PID:" + $processVar.id}}}
- felixfbecker 8y agoThat foreach looks like it should really be a where
- tracker1 8y agoIt was copied from stackoverflow... apologies, I just knew it was possible.
- jodrellblank 8y agoPS C:\> gps |? {$_.Modules.FileName -match "wshtcpip\.dll"} | select name, id
- kevingadd 8y agoThe way filesystem locking works on Windows is an intentional decision and not an NTFS thing. It's there for a good reason even if it's inconvenient. The alternative has some real downsides. "Two CMD windows have the same CWD but are showing different folders" is not a user-friendly experience.
- blibble 8y agoI bet pretty much every Windows user would trade confusing command prompts in strange circumstances for not having to reboot for pretty much every single Windows Update (due to it being unable to update files that are in use)
- muststopmyths 8y agoIt would be horrendous to even try to troubleshoot a system with a dozen different version of OS DLLs loaded because the system had not been rebooted for a dozen patches. Or, imagine every copy of Word you have running is using a different set of binaries. No, thank you.
- kevin_thibedeau 8y agoAnd yet Linux distros some how manage years of uptime with continuous updates.
- rkagerer 8y agoSend To > Unlocker
- muststopmyths 8y agodownload sysinternals tools, one of which is "handle" for quickly finding open files. Yeah, it should come with the OS, but that's Windows for you.