Nant and changing file properties (read-only to writable)
Asked Answered
C

2

9

As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this?

Coulometer answered 16/9, 2008 at 18:26 Comment(0)
R
11

Use the <attrib> task. For example, to make the file "test.txt" read/write, you would use

<attrib file="test.txt" readonly="false"/>
Roanne answered 16/9, 2008 at 18:30 Comment(0)
C
7

Also, for a list of files, the command is:

<attrib readonly="false">
  <fileset basedir="mydirectory">
    <include name="**"/>
  </fileset>
</attrib>
Coulometer answered 16/9, 2008 at 20:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.