ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: chmod on windows
Date Tue, 04 Jun 2002 15:48:32 GMT
--- Rum Pel <> wrote:
> Whats the equivalent of chmod task on windows?

Jesse Stockall submitted an Attrib task you could use. See:

Excerpted from one of his follow-ups:
    With the chmod task for Unix & the Attrib task for Windows I can
    make a file read-only for both platforms with the following

      <chmod file="${src}/" perm="-w"/>
      <attrib file="${src}/" perm="+R"/>

    Each task is only executed on the appropriate platform.

> Also, is it possible to execute tasks based on conditions?

The <exec> task allows for, but not -- the <condition>
task has a nested <os> condition that tests for various aspects of the OS
(see the doc for details).

If you want to stay with <exec>, you could use <condition> to set a
property for the name of the executable and the corresponding flags, then
reference those properties in your <exec> task.



Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message