lock a file?

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
andwan0
Junior Member
Junior Member
Posts: 5
Joined: 2010-02-24, 11:34 UTC

lock a file?

Post by *andwan0 »

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....
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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.
User avatar
wanderer
Power Member
Power Member
Posts: 1644
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Save the following into a .reg file and execute it:

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.
Post Reply