camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: How to copy files from one directory to another within the same ftp server.
Date Sat, 01 Mar 2014 16:48:11 GMT
Sounds good.
Something in that direction?

template.sendBody("direct:trigger", "filename")

from("direct:trigger")
  // http://camel.apache.org/ssh
  // When the SSH Component is used as a Producer (.to("ssh://...")), it 
  // will send the message body as the command to execute on the remote SSH
server.
  .setBody(simple("mv /old/dir/${body} /new/dir/${body}")
  .to("ssh:....")


Jan  

> -----Ursprüngliche Nachricht-----
> Von: Christian Müller [mailto:christian.mueller@gmail.com]
> Gesendet: Samstag, 1. März 2014 12:21
> An: users@camel.apache.org
> Betreff: Re: How to copy files from one directory to another within the
> same ftp server.
> 
> No, the ftp component is designed to poll the directory and to consume
> the file.
> But you are right, your approach is much better. What's about using SSH
> [1] for doing this? Camel does support it...
> 
> [1] http://camel.apache.org/ssh
> 
> Best,
> 
> Christian
> -----------------
> 
> Software Integration Specialist
> 
> Apache Member
> V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
> Apache Incubator PMC Member
> 
> https://www.linkedin.com/pub/christian-mueller/11/551/642
> 
> 
> On Sat, Mar 1, 2014 at 8:56 AM, Jan Matèrne (jhm) <apache@materne.de>
> wrote:
> 
> > I think in this way the data is transfered to the running Camel
> > instance and back to the ftp-server.
> > If I googled right [1] FTP itself supports renaming files (and with
> > that moving to different directories).
> >
> > Camel does not support that, right?
> >
> >
> > Jan
> >
> > [1]
> >
> > http://stackoverflow.com/questions/9461844/how-to-move-files-using-
> ftp
> > -comma
> > nds
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Christian Müller [mailto:christian.mueller@gmail.com]
> > > Gesendet: Freitag, 28. Februar 2014 22:08
> > > An: users@camel.apache.org
> > > Betreff: Re: How to copy files from one directory to another within
> > > the same ftp server.
> > >
> > > As simple as
> > >
> > > <route>
> > >   <from uri="ftp://in"/>
> > >   <to uri="ftp://out"/>
> > > </route>
> > >
> > > Best,
> > >
> > > Christian
> > > -----------------
> > >
> > > Software Integration Specialist
> > >
> > > Apache Member
> > > V.P. Apache Camel | Apache Camel PMC Member | Apache Camel
> committer
> > > Apache Incubator PMC Member
> > >
> > > https://www.linkedin.com/pub/christian-mueller/11/551/642
> > >
> > >
> > > On Tue, Feb 25, 2014 at 10:46 AM, skasish <asish_sam@hotmail.com>
> > > wrote:
> > >
> > > > Christian,
> > > >
> > > > Thank you for your reply.
> > > >
> > > > But I cannot find such type of example.
> > > >
> > > > Can you tell me the specific name
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > > http://camel.465427.n5.nabble.com/How-to-copy-files-from-one-
> > > directory
> > > > -to-another-within-the-same-ftp-server-tp5747898p5747925.html
> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > > >
> >
> >


Mime
View raw message