lock a file

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
andwan0
Posts: 3
Joined: 06 Jun 2014 12:39

lock a file

Post by andwan0 »

possible to "lock" a file?

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: lock a file

Post by binocular222 »

What do you mean by "lock"? prevent it from rename or open or move or copy,...?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

andwan0
Posts: 3
Joined: 06 Jun 2014 12:39

Re: lock a file

Post by andwan0 »

binocular222 wrote:What do you mean by "lock"? prevent it from rename or open or move or copy,...?
yes

Stef123

Re: lock a file

Post by Stef123 »

andwan0 wrote:
binocular222 wrote:What do you mean by "lock"? prevent it from rename or open or move or copy,...?
yes
:biggrin: - I have no solution, but this turns into an interesting wish ....
You still want to be able to view the contents of the file, right? But keep it frozen to its present location and file name and content status?

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: lock a file

Post by Marco »

Maybe you could change it's access rights on the fly. Provided that you're a standard (non-admin) user but you have admin credentials too.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

andwan0
Posts: 3
Joined: 06 Jun 2014 12:39

Re: lock a file

Post by andwan0 »

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:

[LINK REMOVED -- too SPAMMY -- admin]

Which does the job well. (source code included on website).

But would be handy if XYplorer we can right-click on a file to lock... and it would highlight background row red or something....

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: lock a file

Post by binocular222 »

Write a script and assign to a custom toolbar button, i.e:

Code: Select all

run """C:\FileLocker.exe"" /I ""<curitem>"" "
For the coloring part, you can add one more line in that script to label that item, i.e:

Code: Select all

tag somelabel, "<curitem>", 0,0
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

Post Reply