commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ter <ter...@yahoo.de>
Subject Re: commons FTP: copy a file within the remote server
Date Thu, 17 Dec 2009 12:45:23 GMT

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


Mime
View raw message