Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.4k views
in .NET FTP by (1.4k points)
How can I copy file in list to another folder on ftp server before I download?
Is this possible?


Dim ftp As SecureFTPConnection
Dim items() As String
Dim file As String
items = ftp.GetFiles


For Each file In items

'would like to copy file to an archive folder on ftp server first but don't see a method to do this.

ftp.DownloadFile(ftpPath & file, ftp.ServerDirectory)

Next file

3 Answers

0 votes
by (162k points)
You can't do this in FTP. You have to download and then upload again.
0 votes
by (1.4k points)
I figured as much, but thought maybe you guys had a backdoor of sorts for the library. I already do it that way, but wanted to save a little bandwidth.
0 votes
by (162k points)
Some servers *may* offer special site commands to do this, or give you the ability to execute a command such as cp. You can do this with the library - the main thing is does the server offer this? Most won't.

Categories

...