Method. Changes directories on the FTP server. This method is valid only after an FTP login is successful. If the FTP session is disconnected, then reconnected, the server directory must be set again. This method is useful when transferring multiple files using the ftpSendFiles and ftpReceiveFiles methods, which transfer files to and from the current local and server working directories.
public void ftpCd(String dir)