Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8733102E7 for ; Mon, 7 Oct 2013 15:01:44 +0000 (UTC) Received: (qmail 53798 invoked by uid 500); 7 Oct 2013 15:01:43 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 53769 invoked by uid 500); 7 Oct 2013 15:01:43 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 53761 invoked by uid 99); 7 Oct 2013 15:01:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Oct 2013 15:01:42 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gudnabrsam@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ea0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Oct 2013 15:01:35 +0000 Received: by mail-ea0-f173.google.com with SMTP id g10so3336069eak.18 for ; Mon, 07 Oct 2013 08:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=4iA5NStqHXumHBIw6Tg391/ezST60tYIOn2QKQMyodQ=; b=ljgbTOd7Pcn4TvH5H5/bZFL2xPAPke6SeE6N0H1AAA+v3Yow9WfXKPECfWhoS7z995 y/cQMWk0JlHYaJWeknCYqEXIQP8O2c0jrWh1d+Ds7G3DhUyjNtV4jvuWUr675K3uQ5m5 1Ql/vU/W7kV1orXYlEHq3qsgEVBtm5Yf+SNdsz2OK/0qId9zIskcmu0BYA3q3M/IxJnq uRfel7Csw7jq0M8QlBJbNWHGr57LU5C6lEtzBvtFS97Co/G6JPp0PP18M3O4piscRlXZ HVjJREjn5DRKvKQm3Oyo4BL/a8C9o1WXxs9UAyQIpSbCkrfSwfnfMpPHvxNmmO6lDrdd Dy6w== MIME-Version: 1.0 X-Received: by 10.15.32.7 with SMTP id z7mr2940442eeu.78.1381158075058; Mon, 07 Oct 2013 08:01:15 -0700 (PDT) Received: by 10.223.13.196 with HTTP; Mon, 7 Oct 2013 08:01:14 -0700 (PDT) Reply-To: gudnabrsam@gmail.com In-Reply-To: <5252CBF2.2050303@tejasoft.com> References: <1381137597723-5714507.post@n5.nabble.com> <5252C192.4070508@tejasoft.com> <5252CBF2.2050303@tejasoft.com> Date: Mon, 7 Oct 2013 10:01:14 -0500 Message-ID: Subject: Re: Copy task not to overwrite but rename the file as _1 _2 etc.. From: Matt Benson To: Ant Users List Content-Type: multipart/related; boundary=089e0160d0ea740a5a04e827ec08 X-Virus-Checked: Checked by ClamAV on apache.org --089e0160d0ea740a5a04e827ec08 Content-Type: multipart/alternative; boundary=089e0160d0ea740a5704e827ec07 --089e0160d0ea740a5704e827ec07 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable No, off the top of my head i can't think of a simple way to do this with a basic Ant installation. Matt On Mon, Oct 7, 2013 at 9:57 AM, Raja Nagendra Kumar < nagendra.raja@tejasoft.com> wrote: > ** > Hi Matt, > > I meant rename as smart rename... nothing related to move.. > > e.g I am copying 3 files from different directories.. but all have the > same name as classes.jar > > when all these are copied to a dir xyz, then copy task should let xyz > would copy classes.jar as is as there is existing classes.jar in xyz dir, > however for 2nd file copy it would rename file as classes1.jar, 3rd one = is > copied as classes2.jar etc.. > > exactly the way windows appends extra strings to file name.. as below > graphics.. > > > > > Regards, > Nagendra > *Raja Nagendra Kumar* > Founder & C.T.O *Mobile:* +91-9886723872 > *Email:* nagendra.raja@tejasoft.com > *IM:* nagendra.raja (Skype) > *http://in.linkedin.com/in/nagkumar* > *TejaSoft Innovations Pvt Ltd* > > Factor 4 Results See who we know in common Want > a signature like this? > > > On 10/7/2013 7:58 PM, Matt Benson wrote: > > To rename files in the same directory you probably want to use the move > task with a glob mapper; just be careful what files you select to begin > with. > > Matt > On Oct 7, 2013 9:14 AM, "Raja Nagendra Kumar" > wrote: > > > Hi Matt, > > Are there any pre-packaged mappers in ant.. which does this mapping by > default.. For flattening there is one already.. but do not see any for > rename when file already exists.. requirement of mine.. > > Regards, > Nagendra > On 10/7/2013 7:25 PM, Matt Benson wrote: > > > It sounds like you want the functionality provided by filename mappers. > > Matt > On Oct 7, 2013 4:20 AM, "Raja Nagendra Kumar" com > > wrote: > > Hi > > > Does copy task have any option to rename to be copie file as > existing_file_1.xx etc.. just like windows does rename the existing > files.. > > Regards, > Nagendra > > > > -- > View this message in context: > http://ant.1045680.n5.nabble.**com/Copy-task-not-to-** > overwrite-but-rename-the-file-**as-1-2-etc-tp5714507.html > Sent from the Ant - Users mailing list archive at Nabble.com. > > ------------------------------**------------------------------** > --------- > 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 > > --089e0160d0ea740a5704e827ec07 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
No, off the top of my head i can't think of a simple w= ay to do this with a basic Ant installation.

Matt
<= /div>


On Mon, = Oct 7, 2013 at 9:57 AM, Raja Nagendra Kumar <nagendra.raja@teja= soft.com> wrote:
=20 =20 =20 =20
Hi Matt,

I meant rename as smart rename... nothing related to move..

e.g I am copying 3 files from different directories.. but all have the same name as classes.jar

when all these are copied to a dir xyz, then copy task should let xyz would copy classes.jar as is as there is existing classes.jar in xyz dir,=A0 however for 2nd file copy=A0 it would rename file as classes1.jar, 3rd one is copied as classes2.jar etc..

exactly the way windows appends extra strings to file name.. as below graphics..


3D""

Regards,
Nagendra
Raja Nagendra Kumar
Founder & C.T.O
3D""
= Mobile: +91-9886723872
Email:=A0nagendra.raja@= tejasoft.com
IM:=A0nagendr= a.raja=A0(Skype)
3D""=A0http://in.linkedin.com/in= /nagkumar
TejaSoft Innovations Pvt Ltd

Factor 4 Results
See who we know in common Want a signature like this?=A0

On 10/7/2013 7:58 PM, Matt Benson wrote:
To rename files in the same directory you probably want to use t=
he move
task with a glob mapper; just be careful what files you select to begin
with.

Matt
On Oct 7, 2013 9:14 AM, "Raja Nagendra Kumar" <nagendra.raja@tejasoft.com=
>
wrote:

Hi Matt,

Are there any pre-packaged mappers in ant.. which does this mapping by
default.. For flattening there is one already.. but do not see any for
rename when file already exists.. requirement of mine..

Regards,
Nagendra
On 10/7/2013 7:25 PM, Matt Benson wrote:

It sounds like you want the functionality provided by filena=
me mappers.

Matt
On Oct 7, 2013 4:20 AM, "Raja Nagendra Kumar"<nagendra.raja@tejasoft.**
com <nag=
endra.raja@tejasoft.com>>
wrote:

 Hi
Does copy task have any option to rename to be copie file as existing_file_1.xx etc.. just like windows does rename the existing files.. Regards, Nagendra -- View this message in context:
http://ant.1045680.n5.nabble.**com/Copy-task-not-to-** overwrite-but-rename-the-file-**as-1-2-etc-tp5714507.html<http://ant.1045680.n5.nabble= .com/Copy-task-not-to-overwrite-but-rename-the-file-as-1-2-etc-tp5714507.ht= ml> Sent from the Ant - Users mailing list archive at Nabble.com. ------------------------------**------------------------------** --------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.**org<user-unsubscribe@ant= .apache.org>
For additional commands, e-mail: user-help@ant.apache.org
------------------------------**------------------------------=
**---------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.**org<user-unsubscribe@ant=
.apache.org>
For additional commands, e-mail: user-help@ant.apache.org

    

--089e0160d0ea740a5704e827ec07-- --089e0160d0ea740a5a04e827ec08--