Welcome to the Xceed Community | Help
Community Search  

xcedd ftp tries to delete files in remote folder ?

Sort Posts: Previous Next
  •  11-19-2008, 7:18 AM Post no. 17019

    xcedd ftp tries to delete files in remote folder ?

    Hi, 

    with this single command
    source.CopyFilesTo(destination, True, True, fileMask)

    Xceed
    1. uploads sucessfuly the file to FTP
    2. logs out
    3. logs in again and tries to delete the file uploaded

    check the log below. why? Thank You

    (001058) 19-11-2008 11:22:23 - John (x.x.x.x)> PASV
    (001058) 19-11-2008 11:22:23 - John (x.x.x.x)> 227 Entering Passive Mode (y.y.y.y,0,20)
    (001058) 19-11-2008 11:22:23 - John (x.x.x.x)> STOR 20081119.zip
    (001058) 19-11-2008 11:22:23 - John (x.x.x.x)> 150 Connection accepted
    (001058) 19-11-2008 11:24:13 - John (x.x.x.x)> 226 Transfer OK
    (001058) 19-11-2008 11:24:13 - John (x.x.x.x)> disconnected.
    (001059) 19-11-2008 11:24:43 - (not logged in) (x.x.x.x)> Connected, sending welcome message...
    [...]
    (001059) 19-11-2008 11:24:43 - (not logged in) (x.x.x.x)> USER John
    (001059) 19-11-2008 11:24:43 - (not logged in) (x.x.x.x)> 331 Password required for John
    (001059) 19-11-2008 11:24:43 - (not logged in) (x.x.x.x)> PASS ***********
    (001059) 19-11-2008 11:24:43 - John (x.x.x.x)> 230 Logged on
    (001059) 19-11-2008 11:24:43 - John (x.x.x.x)> CWD /BackFolder/MyFiles
    (001059) 19-11-2008 11:24:43 - John (x.x.x.x)> 250 CWD successful. "/BackFolder/MyFiles" is current directory.
    (001059) 19-11-2008 11:24:43 - John (x.x.x.x)> DELE 20081119.zip
    (001059) 19-11-2008 11:24:43 - John (x.x.x.x)> 550 Permission denied
    (001059) 19-11-2008 11:24:44 - John (x.x.x.x)> disconnected.

  •  11-19-2008, 11:37 AM Post no. 17034 in reply to 17019

    Re: xcedd ftp tries to delete files in remote folder ?

    Do you have a sample application reproducing the issue?
    André
    Software Developer and Tech Support
    Xceed Software Inc.
  •  11-19-2008, 5:21 PM Post no. 17038 in reply to 17034

    Re: xcedd ftp tries to delete files in remote folder ?

    The problem is:

    we have an internal application. The application compresses (ZIP) some files (bds backups, windows backup files - bkfs) and then connects (code below) to a remote FTP and sends the zip file.

    the strange thing is:

    this single line
    source.CopyFilesTo(destination, True, True, "myzip.zip")
    - sometimes, sends sucessfuly the ZIP file, disconnects from the server then... connects again and deletes the ZIP file
    - sometimes  sends sucessfuly the ZIP file and the file is NOT deleted

    but I allways get this error

    Erro no FTP : An unexpected internal failure occurred in the FileSystem component, or one of its descendants.
    Type: Xceed.FileSystem.DiskFolder
    FullName: C:\Data\Documents
    C:\Data\Documents is the sourceFolder containing the ZIP file - "myzip.zip"
    thank you

    Dim connection As FtpConnection
    connection = New FtpConnection(_ftpServer, 21, _userName, _password)

    Dim PassiveFtp As Boolean = True
    connection.PassiveTransfer = PassiveFtp
    Dim source As New DiskFolder(sourceFolder)

    Dim remoteFolder As String = ""
    remoteFolder = _remoteFolder

    Dim destination As New FtpFolder(connection, remoteFolder)
    source.CopyFilesTo(destination, True, True, "myzip.zip")

    connection.CloseConnections()
    connection.Dispose()

  •  11-24-2008, 11:21 AM Post no. 17115 in reply to 17038

    Re: xcedd ftp tries to delete files in remote folder ?

    This is because you are using the FileSystem interface (FtpConnection).  What happens is that when making a CopyTo(), if an exception is thrown inside that call, the component will call Delete() on the destination file to avoid leaving an incomplete file lying around. This is why you're seeing a delete command on your server.

    Now, the problem is why are you getting an exception on your source folder?

    Could you paste the complete exception message and stack trace here?  And if there is an inner exception, could you also paste its complete message and stack trace?

     


    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.