DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: idea - a simple prog to protect files/folder from deletion  (Read 23,273 times)

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
idea - a simple prog to protect files/folder from deletion
« on: December 31, 2005, 03:37 AM »
i just discovered that one of my music folder (3GB) has been deleted without my knowledge, i dont remember i delete that folder, it could have been deleted by me by accidental when i half awake or some other music player progs deleted it.

there are many shareware out there that can protect or hide a folder or files with password, but the users have to enter the password each time, this is too troublesome, it would be great if there is a simple prog that deny delete to a folder or files, this will prevent accidental deletion.

thank you.

If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: idea - a simple prog to protect files/folder from deletion
« Reply #1 on: December 31, 2005, 03:48 AM »
Well, a simple program which keeps the file 'open' would be the easy way. I'll chuck some code together :)

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: idea - a simple prog to protect files/folder from deletion
« Reply #2 on: December 31, 2005, 04:51 AM »
Aaaaand, done!

http://bluescreenofdeath.co.uk/Programs/Locker

Each line of the config file should contain a file to lock, click Re-Lock and you're done. It locks all files when it loads too, it doesn't need to be installed so you can run the exe and config file from anywhere. It's only 10KB big, and shouldn't have any problems loading huge files... Have fun :D

EDIT: Yay, it now supports directories, example:

DIR:C:\My music
C:\important file.txt

Would lock all files in C:\My music\ and C:\important file.txt

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:
« Last Edit: December 31, 2005, 05:15 AM by PhilKC »

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
Re: idea - a simple prog to protect files/folder from deletion
« Reply #3 on: December 31, 2005, 05:11 AM »
thank you very much Phil, but i got this:


and can it add a folder with all the files in the subfolders? i have more than 5000 wma/mp3, not possible to add one by one.

thx again.
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: idea - a simple prog to protect files/folder from deletion
« Reply #4 on: December 31, 2005, 05:22 AM »
Right, that error means you don't have the latest .NET framework:

http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en

Oh, and your comment about the directories... it can add directories now :)

Two ways of adding a DIR:

DIR:C:\

Will add all files in C:\

DIRS:C:\

Will add all files in C:\ and all subdirectories (DO NOT ADD \WINDOWS\ TO THE LIST)

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:
« Last Edit: December 31, 2005, 05:52 AM by PhilKC »

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
Re: idea - a simple prog to protect files/folder from deletion
« Reply #5 on: December 31, 2005, 06:03 AM »
that's awesome, thanks again Phil, i will install .NET and try again.
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: idea - a simple prog to protect files/folder from deletion
« Reply #6 on: December 31, 2005, 06:06 AM »
that's awesome, thanks again Phil, i will install .NET and try again.

I really should start versioning my programs, anyway, redownload (I've just uploaded it), i'll start at... 1.0.0.0

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:

techwiznoob48

  • Participant
  • Joined in 2009
  • *
  • Posts: 1
Re: idea - a simple prog to protect files/folder from deletion
« Reply #7 on: April 11, 2009, 04:27 AM »
Aaaaand, done!

http://bluescreenofdeath.co.uk/Programs/Locker

Each line of the config file should contain a file to lock, click Re-Lock and you're done. It locks all files when it loads too, it doesn't need to be installed so you can run the exe and config file from anywhere. It's only 10KB big, and shouldn't have any problems loading huge files... Have fun :D

EDIT: Yay, it now supports directories, example:

DIR:C:\My music
C:\important file.txt

Would lock all files in C:\My music\ and C:\important file.txt

PhilKC
can i ask for this please?  the link no longer works...please please....??

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: idea - a simple prog to protect files/folder from deletion
« Reply #8 on: April 11, 2009, 03:04 PM »
Awesome idea!

erikts

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 227

smbdy234

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 4
Re: idea - a simple prog to protect files/folder from deletion
« Reply #10 on: April 21, 2009, 03:06 PM »
Is there anyone out there who has this software and can either post it, or send it in an email?  I want this one... Please....  The link no longer works...  Thanks...
TJ

steeladept

  • Fettucini alfredo is macaroni & cheese for adults
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • Linux User
    • Military Service Badge - US Air Force
Re: idea - a simple prog to protect files/folder from deletion
« Reply #11 on: April 23, 2009, 08:41 AM »
Maybe I am missing something, but can't this be accomplished by just editing the permissions to prevent deletion?

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: idea - a simple prog to protect files/folder from deletion
« Reply #12 on: April 23, 2009, 09:56 AM »
Maybe I am missing something, but can't this be accomplished by just editing the permissions to prevent deletion?
Beat me to it :) - simply set NTFS permissions and you're good to go. Notice that you'll have to find the "advanced permissions" to see the Delete token.
- carpe noctem

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: idea - a simple prog to protect files/folder from deletion
« Reply #13 on: August 18, 2009, 12:41 PM »
Forget it if the author doesn't want to fix the link then he is not interested in donating his piece of cake

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: idea - a simple prog to protect files/folder from deletion
« Reply #14 on: August 18, 2009, 12:51 PM »
Maybe I am missing something, but can't this be accomplished by just editing the permissions to prevent deletion?
Beat me to it :) - simply set NTFS permissions and you're good to go. Notice that you'll have to find the "advanced permissions" to see the Delete token.

That doesn't stop it if you're running as the person who set the delete bit, does it?  I mean, manually deleting, sure... but if some errant program deletes it, it could also unset the bit, right?

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: idea - a simple prog to protect files/folder from deletion
« Reply #15 on: August 18, 2009, 02:32 PM »
wraith808: the delete permission is different from the read-only file attribute; there aren't a lot of programs that mess with NTFS ACLs, so for casual purposes this should be fine.
- carpe noctem

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: idea - a simple prog to protect files/folder from deletion
« Reply #16 on: August 18, 2009, 04:23 PM »
Ah!  You mean actually revoke delete permissions to the folder- I didn't think of that.  I did indeed think you were referring to the read-only file attribute.

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: idea - a simple prog to protect files/folder from deletion
« Reply #17 on: August 18, 2009, 04:30 PM »
Ah!  You mean actually revoke delete permissions to the folder- I didn't think of that.  I did indeed think you were referring to the read-only file attribute.
:)

Of course the delete permission can be re-applied if you have the rights to do so... but that's not something normal applications attempt to do when they want to delete a file, hence "I suspect this solution is good enough".
- carpe noctem

Original address: https://www.donationcoder.com/forum/index.php?topic=1969.0