Skip to content
Utility

LockSmith

Shows who has a file open over SMB and lets you force-close the session. Useful when someone's mounted your share and wandered off. Uses NetFileEnum — admin required.

Rustegui

“The action can’t be completed because the file is open in another program” — and no hint of which program. LockSmith lists the files held open over SMB on your machine and lets you close the session behind them. It’s Rust and egui, so it starts in half a second with no WebView2 or browser runtime, which matters when you’re chasing a stuck lock.

What it does

  • Lists files currently opened through Windows file sharing APIs.
  • Filters by file name, path, or username.
  • Sorts columns.
  • Supports multi-select with Ctrl+Click and Shift+Click.
  • Releases selected locks with confirmation.
  • Supports light and dark themes.
  • Runs fully offline with no telemetry.

Requirements

  • Windows 10 or Windows 11.
  • Administrator privileges.
  • Rust only if building from source.

LockSmith uses Windows network file APIs such as NetFileEnum and NetFileClose, which require elevation.

Important safety warning

Releasing a file lock forcibly closes a handle owned by another process. This can cause:

  • unsaved data loss
  • application crashes
  • file corruption if a write is interrupted

Use LockSmith only when normal methods have failed, such as closing the owning application, waiting for a copy to finish, or restarting a stuck process.

Install

Download the latest release from:

https://github.com/Swatto86/LockSmith/releases

Run the executable as Administrator.

Basic workflow

  1. Right-click locksmith.exe and choose Run as administrator.
  2. Review the list of open files.
  3. Use search to filter by file name, path, or user.
  4. Select one or more rows.
  5. Click Release Selected Lock(s) or press Delete.
  6. Confirm the action.

Keyboard shortcuts

ShortcutAction
F5Refresh file list
DeleteRelease selected locks
Ctrl+ASelect all visible files
Ctrl+ClickToggle row selection
Shift+ClickSelect a range
Double-clickRelease a single lock with confirmation

Known limitations

  • Windows only.
  • Administrator required.
  • The underlying Windows APIs focus on files opened through SMB/network shares hosted by the machine. Local-only handles may not appear.

Build from source

git clone https://github.com/Swatto86/LockSmith.git
cd locksmith\src
cargo build --release

Run tests and checks:

cargo test
cargo fmt --check
cargo clippy

Troubleshooting

Access denied

Run as Administrator.

No files are shown

This can be normal if no files are currently open via network shares, the Server service is not running, or there are no active shares on the machine.

Releasing a lock did not fix the problem

Another process may immediately reopen the file, or the lock may be a local handle not visible through the network file API. Use Task Manager, Resource Monitor, or Sysinternals tools for deeper local-handle cases.

  • GitHub: https://github.com/Swatto86/LockSmith
  • Releases: https://github.com/Swatto86/LockSmith/releases
← All tools