commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cole" <sc...@camsbycbs.com>
Subject Re: commons FTP: copy a file within the remote server
Date Thu, 17 Dec 2009 13:27:02 GMT
I've never used the SITE command and I wasn't sure if it would accept OS
commands, shell out and run them, but it looks like maybe it only supports
specific FTP server commands. I think performing SITE HELP will list the
supported commands. Have you considered using a telnet or SSH client?

----- Original Message ----- 
From: "ter" <ter055@yahoo.de>
To: <user@commons.apache.org>
Sent: Thursday, December 17, 2009 7:45 AM
Subject: Re: commons FTP: copy a file within the remote server


>
> Hello Steve, looks like that method send a "SITE" command plus the String
> attribute you put in the method.
> I.e. I am getting
> "500 'SITE CP file1.dat dir2/file1.dat': command not understood."
>
>
> Steve Cole-6 wrote:
> >
> > Not sure how widely supported it is, but you could try using the site()
> > method to execute a native OS command to copy the file.
> >
> > ----- Original Message ----- 
> >> Hello All,
> >>
> >> -org.apache.commons.net.ftp- (FTPClient FTPReply)
> >>
> >> I have been searching for a method to copy a file remotely within a ftp
> >> server with no luck.
> >> I can download and upload the file (which would do it), but I only need
> >> to
> >> copy it within the server and that is bad resources management in my
> >> view.
> >>
> >> I even found an example on how to copy a file between two ftp servers,
> >> but
> >> when I try that with only one didn't work. Maybe partially because in
> >> that
> >> example one server has to be set to passive and the other to active and
> >> cannot do both things if I only have one...
> >>
> >> I might oversee something? I have the feeling this should be an easy
task
> >> :)
> >> Any ideas welcome.
> >>
> >> Thanks!
> >> Ter
> >
>
> -- 
> View this message in context:
http://n4.nabble.com/commons-FTP-copy-a-file-within-the-remote-server-tp965394p965954.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


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


Mime
View raw message