You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/powertoys/file-locksmith.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,4 +25,32 @@ When File Locksmith is opened, it will scan all of the running processes that it
25
25
26
26
After scanning, a list of processes will be displayed. Select **End task** to terminate the process, or select the expander to show more information. File Locksmith will automatically remove terminated processes from the list, whether or not this action was done via File Locksmith. To manually refresh the list of processes, select **Reload**.
27
27
28
+
## Manage File Locksmith from the command line
29
+
30
+
The File Locksmith CLI lets you identify and manage processes that are locking files from the command line.
31
+
32
+
**Commands**
33
+
| Command | Description |
34
+
| :--- | :--- | :--- |
35
+
|`<path>`|**Required**. One or more file or directory paths to check. You can specify multiple paths separated by spaces. |
36
+
|`--kill`| Terminates (kills) all processes that are currently locking the specified files. |
37
+
|`--json`| Outputs the results in structured **JSON** format instead of human-readable text. Useful for automation and scripts. |
38
+
|`--wait`|**Blocks execution** and waits until the specified files are released. The command will not exit until the files are unlocked. |
39
+
|`--help`| Displays the help message with usage instructions. |
40
+
41
+
**Usage example**
42
+
```powershell
43
+
# Check which processes are locking a specific file:
44
+
FileLocksmithCLI.exe "C:\Users\Docs\report.docx"
45
+
46
+
# Check multiple files and get the output in JSON format for parsing:
0 commit comments