hi
Is there a batch file code that prevents deleting a specific file ??
Is there a batch file code that prevents deleting a specific file ??
Moderator: DosItHelp
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Is there a batch file code that prevents deleting a specific file ??
In what context?
While looping through a list of files and deleting all of them except for a specific file? Sure.
Actively monitoring a folder and magically detecting if a file gets deleted? No, that's absurd and no such software exists for that anywhere regardless of language.
While looping through a list of files and deleting all of them except for a specific file? Sure.
Actively monitoring a folder and magically detecting if a file gets deleted? No, that's absurd and no such software exists for that anywhere regardless of language.
Re: Is there a batch file code that prevents deleting a specific file ??
-------------------------------------ShadowThief wrote: ↑05 Nov 2021 02:30In what context?
While looping through a list of files and deleting all of them except for a specific file? Sure.
Actively monitoring a folder and magically detecting if a file gets deleted? No, that's absurd and no such software exists for that anywhere regardless of language.
hi
I want when I try to delete the folder from its place !
Re: Is there a batch file code that prevents deleting a specific file ??
File and Folder permissions are all controlled by the ACL for that file or folder. It should be easy enough to remove the file or folder permissions for standard users from deleting a file with ICACLS.exe but Administrators normally have full rights to do what they want. You could use ICACLS to remove the administrators from deleting the file or folder as well but I wouldn't recommend it.