possible to "lock" a file?
I do programming development work, and sometimes need to simulate a situation when a file is locked. There's no way to easily do this, but I found a program/tool to do this:
http://www.jensscheffler.de/filelocker File Locker
Which does the job well. (source code included on website).
But would be handy if Total Commander we can right-click on a file to lock... and it would highlight background row red or something....
lock a file?
Moderators: Hacker, petermad, Stefan2, white
You need a tool that locks file and sits in context menu, and a WDX plugin that detects locked file (e.g. this one), that's all.
Save the following into a .reg file and execute it:
The idea is to go in registry at Computer\HKEY_CLASSES_ROOT\*\shell. Under that, add a folder named "LockFile" (or name it whatever you like) and under that a folder "command" (this folder must have that specific name). In that folder, go to the default value and add the full path of your utility that is used for file locking, followed by a space and "%1". It's not manageable by TC as you suggest, but at least you have it everywhere with a right-click.
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\LockFile\command]
@="C:\\LockFile.exe \"%1\""
The idea is to go in registry at Computer\HKEY_CLASSES_ROOT\*\shell. Under that, add a folder named "LockFile" (or name it whatever you like) and under that a folder "command" (this folder must have that specific name). In that folder, go to the default value and add the full path of your utility that is used for file locking, followed by a space and "%1". It's not manageable by TC as you suggest, but at least you have it everywhere with a right-click.
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.