+1 vote

Hi,

I am trying to to move all files on a server folder to another server folder.
All files will disappear on the source folder, but not be found at destination folder (are deleted?).
There is no exception thrown.

Here is my code (ftpClient passed is a established connection):

Private Function MoveServerFiles(
    ftpClient As Ftp, 
    ByVal serverFolder As String, 
    serverMoveToFolderAfterDownload As String) As Boolean
    Try
        Dim count As Integer = 0
        For Each item As FtpItem In ftpClient.GetList(serverFolder)
            If item.IsFile Then
                ftpClient.Rename(
                    serverFolder & "/" & item.Name, 
                    serverMoveToFolderAfterDownload & "/" & item.Name)
                count += 1
            End If
        Next
        Return True
    Catch xException As Exception
        Return False
    End Try
End Function

Thanks!


Thank you very much for the quick answer!

Now it works. It seems to have been a problem with the refresh of the FTP client display.

Your support is outstanding.

closed with the note: "Now it works. It seems to have been a problem with the refresh of the FTP client display."
by
closed by
...