Page 1 of 1
lock a file
Posted: 06 Jun 2014 12:41
by andwan0
possible to "lock" a file?
Re: lock a file
Posted: 06 Jun 2014 12:43
by binocular222
What do you mean by "lock"? prevent it from rename or open or move or copy,...?
Re: lock a file
Posted: 06 Jun 2014 13:14
by andwan0
binocular222 wrote:What do you mean by "lock"? prevent it from rename or open or move or copy,...?
yes
Re: lock a file
Posted: 06 Jun 2014 13:45
by Stef123
andwan0 wrote:binocular222 wrote:What do you mean by "lock"? prevent it from rename or open or move or copy,...?
yes

- 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?
Re: lock a file
Posted: 06 Jun 2014 13:56
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.
Re: lock a file
Posted: 06 Jun 2014 15:19
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....
Re: lock a file
Posted: 06 Jun 2014 15:41
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: