Xceed FTP Library Documentation
XceedFtp control reference / Methods / ChangeCurrentFolder method
In This Topic
    ChangeCurrentFolder method
    In This Topic

    Description

    Changes the FTP server's current working folder .

    The folder or path you specify in the sFolder parameter can be relative to the current folder, or can be an absolute path on the remote system. If you wish to change the current folder to the parent folder, or rewind to the parent folder, you should use the ChangeToParentFolder method instead of the traditional ".." path item, which is a system-specific notation that may not work on all FTP servers.

    A trailing backslash is not required.

    This method can only be used when the CurrentState property's value is fcsConnected.

    Parameters 

    Parameter Description
    sFolder The new folder or path to change to.

    Remarks

    Methods that send the PWD command do not report errors in the case where the PWD command fails.

    Declaration  
    HRESULT ChangeCurrentFolder( [in] BSTR sFolder )

    Applicable properties

    CurrentFolder, AutoRefreshCurrentFolder

    Events triggered

    LoggingCommandLine, ProcessCompleted