ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knuplesch, Juergen" <Juergen.Knuple...@icongmbh.de>
Subject AW: AW: Rename a dir
Date Mon, 29 Mar 2010 06:34:31 GMT
Hello,

I now wrote my own task "renamedir", because

1.I find the described syntax confusing (calling a dir a file will confuse me again, when
I have to analyze the code in a few months)
2.It does not seem to do what it should under windows XP
3.I inspected the source code of ANT 1.7.1 and it is not designed for a simple renamedir,
because if renamedir fails it does a real move, and I rather want the build to fail in zhis
case.
4.It is great to write ANT tasks, if I give me the time to do it (this was not planned in
my SCRUM)...

Thanks anyway for your mails that show me, that the topic is really complicated.

Juergen


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Mike Stewart [mailto:MStewart@mgtplc.com] 
Gesendet: Freitag, 26. März 2010 16:59
An: Ant Users List
Betreff: Re: AW: Rename a dir

try:
 
  <move todir="new/dir/to/move/to">
    <fileset dir="src/dir"/>
  </move>
  <delete dir="src/dir" />
Mike S.
 
 

>>> "Knuplesch, Juergen" <Juergen.Knuplesch@icongmbh.de> 26/03/2010
14:34 >>>
Hello,

I dont think so, because this will move the files inside the dir instead of just rename the
name of the dir.

juergen 


-- 
Jürgen Knuplesch                   
-----Ursprüngliche Nachricht-----
Von: St. Denis, David [mailto:david.stdenis@siemens.com]
Gesendet: Freitag, 26. März 2010 15:26
An: Ant Users List
Betreff: RE: Rename a dir

Is this not what you are looking for?

  <move todir="new/dir/to/move/to">
    <fileset dir="src/dir"/>
  </move>



-----Original Message-----
From: Knuplesch, Juergen [mailto:Juergen.Knuplesch@icongmbh.de]
Sent: Friday, March 26, 2010 2:04 AM
To: Ant Users List
Subject: AW: Rename a dir

Thanks Antoine,

The ANT docu says:

Since Ant 1.6.3, the file attribute may be used to move (rename) an entire directory. If tofile
denotes an existing file, or there is a directory by the same name in todir, the action will
fail. 

So my code seems to be correct.

I think todir will move the first dir inside the second dir and this is not a rename.

So the question remains: How to rename a dir with ANT 1.7.1 and Windows XP? 

Does anyone know?
Maybe I have a look in the code....

Greetings Juergen


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121
-----Ursprüngliche Nachricht-----
Von: Antoine Levy Lambert [mailto:antoine@gmx.de]
Gesendet: Donnerstag, 25. März 2010 18:58
An: Ant Users List
Betreff: Re: Rename a dir

try using the todir attribute instead of tofile. I am not sure what the end result will be
but this might be faster.

Regards,

Antoine

Knuplesch, Juergen wrote:
> Hello,
>
> I want to rename a dir and used the following:
>       <property name="dirbase2.new"
location="${dirbase2}BUILDFAILED"/>
>       <move  file="${dirbase2}" tofile="${dirbase2.new}" />
>
> But this moved all the files inside dirbase2 to dirbase2.new:
>      [echo] finally message
>      [move] Moving 14406 files to ...
>
> I just want to rename the dirname!
>
> I use ANT with Windows XP and this is a network path.
>
> Is a way to do this in ANT?
>
> Greetings Jürgen
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


--
This message has been scanned for viruses and dangerous content by MailScanner, and is believed
to be clean.


Please consider the environment before printing this email

*********************************************************************
This e-mail and any attachments are confidential.  If it is not for you,
please inform us and delete it immediately without disclosing, copying,
or distributing it.

If the content is not about the business of the MGt Group or its
clients, then it is neither from nor sanctioned by the MGt Group.  Use
of this or any other MGt Group e-mail facility signifies consent to
interception by the MGt Group. The views expressed in this email or any
attachments may not reflect the views and opinions of the MGt Group.

This message has been scanned for viruses and dangerous content by
MailScanner, but the MGt Group accepts no liability for any damage
caused by the transmission of any viruses.

MGt plc is a public limited company registered in Scotland (SC175703)
with its registered office at Cluny Court, John Smith Business Park,
Kirkcaldy, Fife, KY2 6QJ.

**********************************************************************

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message