I am researching but I am not able to find a solution to lock file or folder on the command line against exclusion.
Suggestions?
Block file or folder from deletion
Moderator: DosItHelp
Re: Block file or folder from deletion
Use attrib and hide it, delete and then remove the hidden attribute again.
It does depend on the method of deletion you are using - say Robocopy with the /mir switch won't respect this.
It does depend on the method of deletion you are using - say Robocopy with the /mir switch won't respect this.
Re: Block file or folder from deletion
It is possible by command line, change file permissions?
For this is the way I wanted to do.
For this is the way I wanted to do.
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Block file or folder from deletion
Yes, you can use the icacls command. http://ss64.com/nt/icacls.html
Re: Block file or folder from deletion
btk wrote:It is possible by command line, change file permissions?
For this is the way I wanted to do.
Sometimes people ask a question and say what they want to do.
This was not one of those days.
Re: Block file or folder from deletion
The only caveat to this command is that it does not work on FAT-based file systems (FAT, FAT32, etc) since they do not store any ACL info.