Solved

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

Posted on 2013-12-05
18
287 Views
Last Modified: 2013-12-30
Is there a way to prevent an Excel file from being deleted?
0
Comment
Question by:Conernesto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
18 Comments
 
LVL 19

Expert Comment

by:jss1199
ID: 39699424
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
 

Author Comment

by:Conernesto
ID: 39699438
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
 
LVL 19

Expert Comment

by:jss1199
ID: 39699465
Perform the steps on the parent folder - it will protect all the files within that folder.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 6

Expert Comment

by:Spyder2010
ID: 39699472
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
 

Author Comment

by:Conernesto
ID: 39699728
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
 
LVL 19

Expert Comment

by:jss1199
ID: 39699740
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
 

Author Comment

by:Conernesto
ID: 39701486
Can an Access Database be protected from being deleted?
0
 

Author Comment

by:Conernesto
ID: 39701560
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
 

Author Comment

by:Conernesto
ID: 39701627
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
 
LVL 19

Expert Comment

by:jss1199
ID: 39701668
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
 

Author Comment

by:Conernesto
ID: 39701910
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
 
LVL 19

Expert Comment

by:jss1199
ID: 39701942
That is fine. It is supposed to unchecked after you apply. Can you test delete?
0
 

Author Comment

by:Conernesto
ID: 39702130
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
 
LVL 19

Expert Comment

by:jss1199
ID: 39702135
Deny delete was applied to everyone?
0
 

Author Comment

by:Conernesto
ID: 39702144
Yes.
0
 

Author Comment

by:Conernesto
ID: 39706253
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
 
LVL 12

Accepted Solution

by:
Harry Lee earned 500 total points
ID: 39721919
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question