As long as a script is useful, it can’t be considered a redundant script. After all, I once tried manually setting permissions one by one right after installing the system; once the workload gets big, a script shows its usefulness.
Granted, xuantian is considering the limitations of this script, so he thinks it is somewhat unnecessary. However, this board is now DOS Batch Files & Script Technology (Batch Processing Room), so there’s no need to focus too much on the connection with DOS. On the contrary, I hope this board can embrace everything; as long as it is related to scripts, everyone can bring it out to study and discuss together.
Re 想学DOS
“As a result, the first three statements worked, but the last two did not.
I guess it is because the Program files folder on the system drive is by default "read-only"..."
It probably isn’t because the program files folder has the read-only attribute, but because from the start the paths in your commands contained spaces. After all, the file access control list (ACL) and file attributes are two different things.