What to write in a batch file to put the rights for the folder "Full access for all"?

There's a flash drive with NTFS. Periodically it happens that you create on one machine it on a file on another machine is not available. What to write in a. bat file to run it
1. Put the right "Full access for all"
2. Exposed that the rights are inherited to all child objects
?
April 4th 20 at 13:07
1 answer
April 4th 20 at 13:09
Solution
In Windows 7 (and newer) on all files/directories in the directory run:
- remove already exposed to the right,
- adds full access for user "Everyone"/"All" (that is, for any user of the system),
- includes inheriting rights from the parent directory.

@echo off
icacls * /T /C /Q /grant:r *S-1-1-0:(OI)F
Thank you. I almost found solution, but incorrectly specify the parameters "(OI)F"

And I do not know, can the owner be changed to "All"? - Arden_Kohler commented on April 4th 20 at 13:12
icacls * /T /C /Q /setowner *S-1-1-0 - dudley_Kunze commented on April 4th 20 at 13:15

Find more questions by tags NTFSAccess rightscmd/bat