Is there a way to prevent an Excel file from being deleted?

Is there a way to prevent an Excel file from being deleted?
ConernestoAsked:
Who is Participating?
 
Harry LeeConnect With a Mentor Commented:
Conernesto,

you have to test the delete with another login account. Since you are the administrator (who can change the permission of the files), you can always delete the files and folders.

In fact, all login names under the Administrators group can delete the files and folders. If you don't want yourself to be able to delete the files, you will have to lock the file permission to only SYSTEM.

System administrators can almost always delete the files, as long as you know how to.

If you really want nobody, including yourself and all the administrators, to not able to delete the files, you have to give Full Control access, of the files, only to SYSTEM.

To do so, you have to remove delete access of Administrators, Everyone, and Creator Owners. And of course, you have to remove Delete access for all other user class accounts.

One thing to watch out, you can accidentally loose control of the files yourself.
0
 
jss1199Commented:
Assume it is on a file server or your local machine?

1.  Right-click the file you want to protect (I'm using c:\users\username\documents\myexcel.xlsx) and choose Properties.

2.  On the Security tab, click Advanced.  The 'Advanced Security Settings for Pictures' dialog options.

3.  Click the Change Permissions... button.

4.  Click the Add... button, and type "everyone" (no quotes) into the box, then click OK.  A 'Permission Entry' dialog appears.

5.  Scroll to the bottom.  Place a checkmark in the 'Deny' column for "Delete".  Do not add any other checkmarks.

6. Click OK.

7.  Click OK.

Windows will set the deny delete permission on this file.
Note: Deny permissions take precedence over allow permissions, so no one will be able to delete any file until/unless this permission item is removed.  This will block other apps from being able to delete either.
0
 
ConernestoAuthor Commented:
I have about 100 excel spreadsheets inside a folder that I want to protect from being deleted. Do I need to do the above steps for each or is there a faster way?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
jss1199Commented:
Perform the steps on the parent folder - it will protect all the files within that folder.
0
 
Spyder2010Commented:
You can set the above mentioned permission on the folder that contains the spreadsheets.  It will inherit down to all the files within the folder
0
 
ConernestoAuthor Commented:
I have subfolders in side the folder that has the Excel worksheets. Is there a way to protect the folder contentets without protecting the PDF folders?
0
 
jss1199Commented:
You would have to set the deny permission at the folder level, and then on each PDF folder remove the Deny permission.

Or rearrange your folders to more easily allow the deny permission to only apply to the folders you wish :)
0
 
ConernestoAuthor Commented:
Can an Access Database be protected from being deleted?
0
 
ConernestoAuthor Commented:
I went ahead and set the permission on the folder to deny as instructed above. I then went into the folder and tried to delete a file and the file was deleted. Did I do something wrong?
0
 
ConernestoAuthor Commented:
When I select delete, I get a message Are you sure you want to send this to the recycle bin?
The file is then deleted.
0
 
jss1199Commented:
Since you are making this change to a folder, there is one additional items you need to check.

1. When adding the delete permission, Select the checkbox that says Replace all child object permissions with inheritable permissions from this object.  See attached screenshot

screenshot of dialog box
0
 
ConernestoAuthor Commented:
I can't seem to get both of ther above check boxes to stay. I check both check boxes and click on apply and one of the check boxes gets unchecked.
0
 
jss1199Commented:
That is fine. It is supposed to unchecked after you apply. Can you test delete?
0
 
ConernestoAuthor Commented:
I did the test. I saved an Excel wb and I was able to delete it. I was also able to delete the folder?
0
 
jss1199Commented:
Deny delete was applied to everyone?
0
 
ConernestoAuthor Commented:
Yes.
0
 
ConernestoAuthor Commented:
Attached are two files. A-Protect.xlsx is an Excel workbood. I protedted this file but I am still able to deleted. the second attachment is a zip file that contains one folder. I also protected this file but I am able to deleted. Can you please reveiw and let me know what I did wrong?
A-Protect.xlsx
A-Protect.zip
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.