Home Forums .NET libraries Xceed SFTP/FTP for .NET PWD error on a server using virtual directory

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Xceed Support
    Post count: 5658
    #20945 |

    I am attempting to download all files in the root folder of an ftp server that uses a virtual directory, but the xceed ftp component is not recognizing the command. Is there some way I can get around this error?

    heres my code

    Public Function DownloadFiles(ByVal strFileMask As String, _

    ByVal strLocalFolder As String) As Integer

    If Not Initialized Then Initialize()

    Dim intVal As Integer = 0

    Dim localFolder As Xceed.FileSystem.DiskFolder

    Dim remoteFolder As Xceed.Ftp.FtpFolder


    If con Is Nothing Then

    con = New Xceed.Ftp.FtpConnection(m_strServer, m_intPort, m_strUser, m_strPass)

    con.DefaultRepresentationType = m_rtTransferType

    End If

    localFolder = New Xceed.FileSystem.DiskFolder(strLocalFolder)

    remoteFolder = New Xceed.Ftp.FtpFolder(con) ‘ error occurs here

    remoteFolder.CopyFilesTo(localFolder, False, True, New NameFilter(strFileMask))

    intVal = 1

    Catch ex As Exception


    intVal = -1

    End Try

    Return intVal

    End Function

    ‘Exception Thrown

    “Xceed.FileSystem.FileSystemException: An error occurred while getting the starting folder.

    Type: Xceed.Ftp.FtpFolder

    FullName: —> Xceed.Ftp.FtpReplyException: Invalid reply format to PWD command.

    at Xceed.Ftp.Engine.FtpCommand.EndExecute(IAsyncResult asyncResult)

    at Xceed.Ftp.Engine.FtpCommand.Execute(FtpCommandChannel commandChannel)

    at Xceed.Ftp.FtpClient.GetCurrentFolder(FtpCommandChannel commandChannel, CurrentFolderFtpCommand command)

    at Xceed.Ftp.FtpClient.GetCurrentFolder()

    at Xceed.Ftp.FtpFolder.GetStartingFolder()

    The FTP reply was:

    230 <virtual directory>

    — End of inner exception stack trace —

    at Xceed.Ftp.FtpFolder.GetStartingFolder()

    at Xceed.Ftp.FtpFolder..ctor(FtpConnection connection)

    at MedXPress.Service.FTP.DownloadFiles(String strFileMask, String strLocalFolder, String[]& strFileList, String& strResponse) in C:\Documents and Settings\user\My Documents\Visual Studio 2005\Projects\ftpService\FTPClient.vb:line 115″

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Frank (had 4698 views)

    User (Old forums)
    Post count: 23064


    Did you find any solution for this?
    Please can you give me the solution used ASAP…

    Thanks in advance

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by S (had 3056 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.