Avatar of ITPro44
Flag for United States of America

asked on 

XCACLS Script Help


I have, with the help of a consultant, come up with this xcacls script run as a bat file.  I am also not very experienced with scripting or coding at all.

The purpose of this script is to change the security settings on .jpg files to read only for everyone within the authenticated users group.  This prevents users from deleting a large number of .jpg files we have (2TB).  I will run this script nightly on the files.  We add about 4gb of jpg files a day and I don't want this script to run on .jpg files that it has already run on.  I only want it to run on the files that are newly added that day.

Is there an if then statement I could add to this script so that it only runs on files that are added within the past day?  Is there another way I should consider doing what I am doing?  I am open to suggestions.

Thanks for your help in advance!!!
xcacls.exe h:\casework\*.jpg /T /E /P "Authenticated Users:R" /Y

Open in new window

Scripting LanguagesWindows Server 2003Visual Basic Classic

Avatar of undefined
Last Comment

8/22/2022 - Mon