|
I can connect to a server using Rebex. client.connect("MK-developmentftp1"); When I do, the default drive I ftp into is D:\ drive. The server also has a "C:\" drive. How do I change directories to the C:\ drive? If I use the following command after logging in : client.ChangeDirectory("C:\") I get an exception error that says: C:\ The filename, directory name or volume label syntax is incorrect. (550) Can anyone tell me what is wrong here? |
|
If I understand you well, you are trying to change remote directory (on FTP server) to another drive. I'm afraid that neither FTP protocol nor FTP servers work with "drives". There is a root directory defined on the FTP server and you can change your working directory into its subdirectories, but not to another drive. I can see several ways to access directories on another drive, but all of them have to be cofigured at the server: a) If you need to access files on the C: drive only, change your FTP root directory to some directory on the C: drive. Setting of the root directory depends on your FTP server. On most of FTP servers, you can define a specific root directory for each individual FTP user. b) If you need to access files on both drives C: and D:, you can link desired directory from C: drive to the directory structure under your root FTP directory on the D: drive. You can do it either by defining virtual directory on your FTP server (if the server supports it - most do) or by defining link on your filesystem. For example, to link directory C:\data\public to D:\ftproot, you can use following MS Windows command on Windows Vista, Windows 7, or Windows Server 2008:
|