Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - patwong1998

Pages: [1]
FTP / Re: FTP2 - How to set Default Remote Directory?
« on: November 03, 2017, 12:17:20 AM »
In the last attached pictures of FileZilla, you can see FileZilla have a setting on "Default Remote Directory"
if it is set before connection, when connection start, it will auto get into the folder by default (no need to change Directory)
if I do not set it, it will go into a certain root folder which you wont see any folders there, I dont think we can trigger the Change Folder command in Chilkat

So I think the only way is to find out the corresponding command of setting the Default Remote Directory in Chilkat FTP2
After API search and Google, I cannot only find help here.

FTP / Re: FTP2 - How to set Default Remote Directory?
« on: November 03, 2017, 12:09:35 AM »
Thank you for reply
This is my first time asking question here, I will post all the information here.

FYI, I'm not a person just ask question before research:
1. I search for the API reference in your webpage.
2. I googled for the Remote Directory setting
3. I tried combinations of settings to make sure I really connected to the FTP

First of all, below is my code (most copied from your API and examples)
        Dim ftp As New Chilkat.Ftp2
        Dim success As Boolean
        success = ftp.UnlockComponent("OUR PURCHASED KEY")
        If success Then
        End If

        ftp.Passive = False
        ftp.Hostname = xftp
        ftp.Username = ftpuser
        ftp.Password = ftppass
        ftp.Port = 990
        ftp.IdleTimeoutMs = 60000  //GOOGLED that seems someone works after this setting, no luck for me

        ftp.AuthTls = False
        ftp.Ssl = True

        success = ftp.Connect()
        If success Then
            logerror("CONNECTED" & ftp.IsConnected.ToString())
            logerror("Folders:" & ftp.GetDirCount().ToString())
        End If

        logerror("FTPS Channel Established!")
        If True Then
            success = ftp.ChangeRemoteDir("/HKEDI")
            If success Then
                logerror("GET INTO FOLDER")
                logerror("CHG FOLDER FAILED")
            End If
        End If

Information: 0x0 at FTP TEST: UNLOCKED
Information: 0x0 at FTP TEST: CONNECTEDTrue
Information: 0x0 at FTP TEST: Folders:-1
Information: 0x0 at FTP TEST: FTPS Channel Established!
Information: 0x0 at FTP TEST: CHG FOLDER FAILED
Information: 0x0 at FTP TEST: ChilkatLog:
    DllDate: Aug 30 2017
    UnlockPrefix: LOGIST.XXXXXXXX
    Architecture: Little Endian; 32-bit
    Language: .NET 2.0
    VerboseLogging: 0
    dir: /HKEDI
        Not connected to an FTP server.  The connection was previously lost, or it was never established.

FTP / FTP2 - How to set Default Remote Directory?
« on: November 02, 2017, 02:16:16 AM »
I have a FTP need to set "Default Remote Directory" when connecting in Filezilla or the directory for my operation will not be shown.

I try to use ChangeRemoteDir after I get into the root
It give me success but when I list the dir, it failed (suppose there are 2 sub-folder inside)

I searched for "Default Remote Directory" in the API, but seems there is not such setting when connecting to FTP

Pages: [1]