How do I change file permission to a certain file pattern to sub folders of my current directory?

We have a Windows 2012 R2 server into which people can log in with their ID using Remote Desktop.
Is it possible to make certain files eg .bat files read only whilst keeping csv files read write on a given drive or directory?
If it can't be done directly through windows settings, what about a batch file or .NET program to go through each bat file on the drive or directory.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alex GreenProject Systems EngineerCommented:
Get-Childitem "Location" -recurse| Get-acl | Export-csv C:\temp\ACL.csv

Open in new window

The below is what I used to test

Get-Childitem "c:\temp" -Recurse | Get-acl | Export-csv c:\fileperm.csv

Open in new window

Or something along those sorts of lines, you can pull everything into a CSV file. You should be able to sort that and deal with the permissions via the CSV and then pipe that back into a set-ACL and then set the security permissions that way

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
How about some old-school dos command:

Open in new window

Alex GreenProject Systems EngineerCommented:
Well I kinda figured he wanted a more secure way but that would work I guess.
AlHal2Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.