Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA2D010EF9 for ; Thu, 6 Feb 2014 07:59:38 +0000 (UTC) Received: (qmail 49885 invoked by uid 500); 6 Feb 2014 07:59:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 49848 invoked by uid 500); 6 Feb 2014 07:59:37 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 49829 invoked by uid 99); 6 Feb 2014 07:59:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 07:59:36 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.219.52 as permitted sender) Received: from [209.85.219.52] (HELO mail-oa0-f52.google.com) (209.85.219.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 07:59:31 +0000 Received: by mail-oa0-f52.google.com with SMTP id i4so1882989oah.39 for ; Wed, 05 Feb 2014 23:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=4kPnYn5gBUgDpzKfV18VsNxkDxoRTSXqeGbXq3k/Jn8=; b=bdXThwAmtj4tJXYK8QPyGzD8BnpJE5TO9xyv26KFq0pA8D2ForjPMyeAMT5BLsSMsO OZ/TxmHdLuRbTNnAHU3Fj4xv3TtSnSckX8EaxKYEEKWFIn8Yh+UqLFVTxS+RYEO2TTot rBia/j/KGtxogXu0iZuzN44USvElv7Kh/osDtekV8UNc8S2gsEJyA69shaZdj/xrQoQ5 7zX5U0G4f0tn9J99fuIUIhs3KZV2/7pzzUlDG0Fxzh9U1CZ92lEfv5d/atTxvBt0JEf9 /m0FyvufiSUhOm1xoMWawSTARfpw22OJ9AkxfHhsOsAN3NlBumFf0NIJPb4dfbxLbrLQ Wwzw== X-Received: by 10.60.37.99 with SMTP id x3mr561147oej.61.1391673550274; Wed, 05 Feb 2014 23:59:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.61.17 with HTTP; Wed, 5 Feb 2014 23:58:50 -0800 (PST) In-Reply-To: References: <1391618624892-5746860.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 6 Feb 2014 08:58:50 +0100 Message-ID: Subject: Re: Camel - SFTP rename problems. To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Feb 5, 2014 at 11:00 PM, G=FCnther, Dirk wrot= e: > Hi Jay, > > the move option will always move the file into a subdirectory and will no= t rename the file. If you want to rename the file, I think, you can do it w= ith the ssh endpoint. > No that is not the intend. You idea would be you can rename and move to another directory, such as using ../ to go one dir back, etc: move=3D../backup/backup-of-${file:onlyname} There file language (part of simple) has these expressions you can use http://camel.apache.org/file-language.html > > > ..... > > mv /opt/data/somedir/${file:name} /opt/data/somedir/${file:= name}_processed.txt > > > > > > Bye, > > Dirk > > -----Urspr=FCngliche Nachricht----- > Von: jay [mailto:mylifemyrulesmywish@gmail.com] > Gesendet: Mittwoch, 5. Februar 2014 17:44 > An: users@camel.apache.org > Betreff: Camel - SFTP rename problems. > > > Hi - i have a requirement to consume the file from remote server using sf= tp and rename the consumed file at same location in remote server. > suppose my remote file name =3D "REMOTEFILE.TXT' > to be renamed to =3D "${date:now}_PROCESSED.TXT" > > I am trying with the below end point - i know which is not correct. > > MYENDPOINT =3D > sftp://user@remoteserver:22//opt/data/somedir?password=3Dsomepassword&loc= alWorkDirectory=3D/tmp&move=3D${file:name}_processed.txt > > the above creating a directory as __processed.txt in remote server and mo= ving the file into it. > > Can some one help me on the issue where it is going wrong or let me know = the best approach as i am new to camel sftp? > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Camel-SFT= P-rename-problems-tp5746860.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > > CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30,= Fax: +49 711 7825-4000, Internet: www.cenit.de > Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen, Oelsni= tz, Ratingen, Saarbruecken > Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt > Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des Aufsichtsrats)= , Hubert Leypoldt, Andreas Karrer > Bankverbindungen: > Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1= 040 00 SWIFT-CODE : DEUTDESS, > Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 = 0155 00 SWIFT-Code : COBADEFF600, > BW-Bank (BLZ 600 501 01) Kto. 2 403 313 IBAN : DE17 6005 0101 0002 4033 1= 3 SWIFT-Code : SOLADEST > Registergericht: Amtsgericht Stuttgart > Handelsregister: HRB Nr. 19117 > Umsatzsteuer: ID-Nr. DE 147 862 777 > --=20 Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io