Tim Dallmann:
>Any suggestions as to the best way to rename a folder.  Can the exec task 
be
>used to issue DOS commands?

Yes, the exec task can be used for that. Use cmd.exe with the /C flag:

<property name="old.name" value="tmp" />
<property name="new.name" value="tmp2" />

<target name="rename.exec">
  <exec program="cmd">
    <arg value="/C move ${old.name} ${new.name}" />
  </exec>
</target>

Another way is via the script task:

<target name="rename.script">
  <script language="C#">
    <code><![CDATA[
      public static void ScriptMain(Project project) {
        Directory.Move(project.Properties["old.name"], 
project.Properties["new.name"]);
      }
    ]]></code>
  </script>
</target>

Hope this helps.

Best,
Bill

William E. Caputo
ThoughtWorks, Inc.
http://www.twelve71.com/caputo/
--------
Continuous Integration: Watchin' the hella tech ta' boost da' shiggety 
shiggety shwa.







-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to