Good Morning.
I have searched these last days about giving permission in folders through the CMD, and I have almost arrived where I wanted, missing a detail that I do not know if it is possible or not.
See if you can help me.
It has a folder, eg C: \ "Hardware_Test", which is always created on the local disk, but does not have a default, can be in C, D etc.
Using the ICACLS command I wanted to give full permission on this folder to all users.
But I would like to know if there is any command or something of the genre that searches for that folder and the permission, without having to keep putting all the possible disks in the batch.
For example:
ICACLS C: \ Hardware_Test / grant "All: (OI) (CI) F" "Administrator: (OI) (CI) F" / T
ICACLS D: \ Hardware_Test / grant "All: (OI) (CI) F" "Administrator: (OI) (CI) F" / T
ICACLS E: \ Hardware_Test / grant "All: (OI) (CI) F" "Administrator: (OI) (CI) F" / T
And so on, if you could search for the folder name and execute ICACLS, you would not have to write multiple command lines, just one.
That is, a command that searches where the folder is, and then run ICACLS.
Does anyone know if this is possible?