# Set file properties to readonly (Windows)

**URL:** <https://discourse.julialang.org/t/set-file-properties-to-readonly-windows/28839>\
**Category:** General Usage\
**Created:** [September 17, 2019, 6:57am UTC](https://discourse.julialang.org/t/set-file-properties-to-readonly-windows/28839 "2019-09-17T06:57:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [September 17, 2019, 6:57am UTC](https://discourse.julialang.org/t/set-file-properties-to-readonly-windows/28839/1 "2019-09-17T06:57:54Z")

</div>

Is it possible to set a file to readonly with a julia command/script? I am using Windows.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 17, 2019, 12:09pm UTC](https://discourse.julialang.org/t/set-file-properties-to-readonly-windows/28839/2 "2019-09-17T12:09:44Z")

</div>

[https://github.com/JuliaLang/Pkg.jl/blob/a807815fc7dd443fb113cbb115c6a2f0ab2a0e25/src/utils.jl#L1-L13](https://github.com/JuliaLang/Pkg.jl/blob/a807815fc7dd443fb113cbb115c6a2f0ab2a0e25/src/utils.jl#L1-L13) can probably be used as inspiration.
