How to rename a dir?

View: New views
7 Messages — Rating Filter:   Alert me  

How to rename a dir?

by Knuplesch, Juergen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

How do I simply rename a directory in ant?

When I use move it copies the directory also
<move file="${dope.target.dirbase2}" todir="${dope.target.dirbase2.new}" />

I just want to rename the name of the directory!

Juergen

--
Jürgen Knuplesch

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


Re: How to rename a dir?

by Scot P. Floess-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Try:

<move file"${dope.target.dirbase2}" tofile="${dope.target.dirbase2.new}"
/>


On Wed, 7 Oct 2009, Knuplesch, Juergen wrote:

> Hello,
>
> How do I simply rename a directory in ant?
>
> When I use move it copies the directory also
> <move file="${dope.target.dirbase2}" todir="${dope.target.dirbase2.new}" />
>
> I just want to rename the name of the directory!
>
> Juergen
>
> --
> Jürgen Knuplesch
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros


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

AW: How to rename a dir?

by Knuplesch, Juergen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you!

Its not what I expected.

Juergen
--
Jürgen Knuplesch                    
-----Ursprüngliche Nachricht-----
Von: Scot P. Floess [mailto:sfloess@...]
Gesendet: Mittwoch, 7. Oktober 2009 16:21
An: Ant Users List
Betreff: Re: How to rename a dir?


Try:

<move file"${dope.target.dirbase2}" tofile="${dope.target.dirbase2.new}"
/>


On Wed, 7 Oct 2009, Knuplesch, Juergen wrote:

> Hello,
>
> How do I simply rename a directory in ant?
>
> When I use move it copies the directory also <move
> file="${dope.target.dirbase2}" todir="${dope.target.dirbase2.new}" />
>
> I just want to rename the name of the directory!
>
> Juergen
>
> --
> Jürgen Knuplesch
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@... For additional
> commands, e-mail: user-help@...
>
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

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


Re: How to rename a dir?

by ray.harper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Quick question ... Are you trying to just rename the dir or are you trying
to
rename a file and move it to a new dir?

If you are trying to do the first, try this instead:

        <move todir="new/dir">
                <fileset dir="olddir"/>
        </move>

I hope this helps ...












"Knuplesch, Juergen" <Juergen.Knuplesch@...>
10/07/2009 10:13 AM
Please respond to
"Ant Users List" <user@...>


To
"Ant Users List" <user@...>
cc

Subject
How to rename a dir?






Hello,

How do I simply rename a directory in ant?

When I use move it copies the directory also
<move file="${dope.target.dirbase2}" todir="${dope.target.dirbase2.new}"
/>

I just want to rename the name of the directory!

Juergen

--
Jürgen Knuplesch

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



Re: AW: How to rename a dir?

by Scot P. Floess-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ha ha - me neither!

A little misleading based upon the docs ;)


On Wed, 7 Oct 2009, Knuplesch, Juergen wrote:

> Thank you!
>
> Its not what I expected.
>
> Juergen
> --
> Jürgen Knuplesch
> -----Ursprüngliche Nachricht-----
> Von: Scot P. Floess [mailto:sfloess@...]
> Gesendet: Mittwoch, 7. Oktober 2009 16:21
> An: Ant Users List
> Betreff: Re: How to rename a dir?
>
>
> Try:
>
> <move file"${dope.target.dirbase2}" tofile="${dope.target.dirbase2.new}"
> />
>
>
> On Wed, 7 Oct 2009, Knuplesch, Juergen wrote:
>
>> Hello,
>>
>> How do I simply rename a directory in ant?
>>
>> When I use move it copies the directory also <move
>> file="${dope.target.dirbase2}" todir="${dope.target.dirbase2.new}" />
>>
>> I just want to rename the name of the directory!
>>
>> Juergen
>>
>> --
>> Jürgen Knuplesch
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@... For additional
>> commands, e-mail: user-help@...
>>
>>
>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-890-8117 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros


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

Re: AW: How to rename a dir?

by Francis Galiegue-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 7, 2009 at 16:33, Scot P. Floess <sfloess@...> wrote:
>
> Ha ha - me neither!
>
> A little misleading based upon the docs ;)
>
>

On the other hand, you may actually want to move directory d to
directory d1 (hence creating d1/d) when you use <move file="d"
todir="d1"/>.

Maybe a <rename> task?

--

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@...
40 avenue Raymond Poincaré
75116 Paris

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


Re: AW: How to rename a dir?

by Scot P. Floess-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Well there is a rename task - but it was deprecated in favor of <move>...

Maybe the tofile attribute could be renamed to be more obvious?

On Wed, 7 Oct 2009, Francis GALIEGUE wrote:

> On Wed, Oct 7, 2009 at 16:33, Scot P. Floess <sfloess@...> wrote:
>>
>> Ha ha - me neither!
>>
>> A little misleading based upon the docs ;)
>>
>>
>
> On the other hand, you may actually want to move directory d to
> directory d1 (hence creating d1/d) when you use <move file="d"
> todir="d1"/>.
>
> Maybe a <rename> task?
>
> --
>
> Francis Galiegue
> ONE2TEAM
> Ingénieur système
> Mob : +33 (0) 683 877 875
> Tel : +33 (0) 178 945 552
> fge@...
> 40 avenue Raymond Poincaré
> 75116 Paris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros


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