How to Remove ReadOnly Attribute on File Using PowerShell?

后端 未结 6 1292
无人及你
无人及你 2020-12-08 01:50

How can I remove the ReadOnly attribute on a file, using a PowerShell (version 1.0) script?

6条回答
  •  离开以前
    2020-12-08 01:58

    or you can simply use:

    get-childitem *.cs -Recurse -File | % { $_.IsReadOnly=$false }
    

    Above will work for all .cs files in sub-tree of current folder. If you need other types included then simply adjust "*.cs" to your needs.

提交回复
热议问题