Change permission of all files with specific extension in a folder and subfolders using CMD

555 Views Asked by At

How to change permission of all files with extension .pyc in a folder and its sub-folder?

individually it will be like this:

c:\folder1> cacls *.pyc /P everyone:F
c:\folder1\a> cacls *.pyc /P everyone:F
c:\folder1\b> cacls *.pyc /P everyone:F

and so on.

1

There are 1 best solutions below

0
Giant Mirchu On

Try Following code:

icacls filename /grant everyone:F /T

/T works for me.