Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-12-05
18
Medium Priority
?
296 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 2000 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

618 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