Skip to main content

Unlatch

Unlatch

CI Release License: MIT

"The action can't be completed because the file is open in another program." Unlatch tells you which program, and lets it go.

Right-click a file or folder, choose What's holding this?, and Unlatch lists every process that has it open, has a working directory inside it, or has it loaded as a program or DLL. End the process in one click, or, as an advanced step, close just the handle that blocks you.

The Unlatch window listing two programs that hold a document: one with an open handle and one with it loaded as a module

Features

  • Finds every kind of hold: open file and folder handles, working directories, loaded DLLs, and program files, for a file, a folder and everything inside it, or several items at once. Works on local drives, volumes mounted in folders, network shares, and WSL paths.
  • Explorer integration: a per-user What's holding this? entry for files, folders, folder backgrounds, and drives. Selecting several items opens one window.
  • Safe actions: before ending a process or closing a handle, Unlatch checks that the PID and handle still belong to what you saw, so a stale row never ends an unrelated program.
  • Honest about blind spots: when not elevated it says how many processes it could not inspect and offers Restart as administrator.
  • Scriptable: unlatch scan --json, unlatch check (exit code 3 when held), unlatch kill, and unlatch release.
  • Fast: one read of the system handle table, filtered before any expensive call; a typical scan takes well under a second.

Unlatch fills the same need as Microsoft PowerToys File Locksmith. It is an independent Python implementation that installs on its own.

Install

Requires Windows 10 or later and Python 3.13 or later.

uv tool install git+https://github.com/mikejhill/unlatch

Wheels are also attached to each GitHub release (uv tool install <wheel URL>). Then add the Explorer menu entry:

unlatch shell install

On Windows 11 the entry is under Show more options (Shift+F10), like other classic menu entries. unlatch shell uninstall removes it.

Use

Do this Run
Open the window unlatch or unlatch-gui (no console)
Open the window on paths unlatch gui C:\path\file.txt C:\path\folder
List holders unlatch scan C:\path\file.txt
List holders as JSON unlatch scan --json C:\path\folder
Test in a script unlatch check C:\path\file.txt (0 free, 3 held, 1 error)
End every holder unlatch kill C:\path\file.txt (asks first; --yes to skip)
Close the blocking handles only unlatch release C:\path\file.txt (asks first)

In the window: F5 scans again, Delete ends the selected process, Ctrl+F filters, Ctrl+C copies details, and right-click offers Open file location and Release handle. Drop files or folders onto the window to add them.

Closing a handle without ending its program is the advanced option: the program is not told, so it may lose data or crash. Ending the process is the safer choice.

Limits

  • Without administrator rights, processes of other users and elevated processes are not visible. Unlatch counts them and offers to restart elevated.
  • Kernel-mode handles (including files opened by other computers over SMB, which belong to the System process) and memory-mapped files whose handle was closed are not reported.

Documentation

Document Contents
Philosophy and architecture Purpose, principles, and how a hold is found
UX contract Promises the window keeps, each proven by a test
Brand Name, icon, and asset rules
Testing Test suites, markers, and mutation testing
Releasing How versions and releases are produced
Contributing Setup and the quality gate

License

MIT. See LICENSE.

Metadata

Release files for unlatch 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unlatch 0.2.0
File Size Uploaded Provenance Actions
unlatch-0.2.0.tar.gz 61.2 kB With provenance Details for unlatch-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unlatch 0.2.0
File Interpreter ABI Platform Actions
unlatch-0.2.0-py3-none-any.whl Python 3 none any Details for unlatch-0.2.0-py3-none-any.whl

Total release size: 129.4 kB

Release files / unlatch-0.2.0.tar.gz

Download URL unlatch-0.2.0.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6c7e00daba745563fa2d3d0533ecb5f1cabfbecd622619b12b6c5cedaa73bac4
BLAKE2b-256 checksum
How to use checksums
4702c69a4dc89507ae2bc6b7fa7add3a88ab0123a75d1d0ec23d5fa13ab49b62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / unlatch-0.2.0-py3-none-any.whl

Download URL unlatch-0.2.0-py3-none-any.whl
Size 68.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f398807adb0a40954a257adb04627f6469eb8806ae1e6c0ba84f10f8bf02ed18
BLAKE2b-256 checksum
How to use checksums
0645109fdb3db71ec9071ae5d50f4540060642ee405de85eeafbfe1c0e131ea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for unlatch 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for unlatch-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page