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?

asked 09 Sep '10, 22:39

eirelav's gravatar image

eirelav
161
accept rate: 0%


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:

   mklink /d D:\ftproot\public C:\data\public    
link

answered 10 Sep '10, 11:46

Jan%20Sotola's gravatar image

Jan Sotola ♦♦
3566
accept rate: 36%

If you don't mind using SFTP to do your transfers, you can use the Bitvise SFTP service. The service create virtual mappings for all your physical drives and you can add network drives that are mapped when a user logs in.

link

answered 16 Sep '10, 19:11

Brian's gravatar image

Brian
261
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×152
×6

Asked: 09 Sep '10, 22:39

Seen: 1,418 times

Last updated: 16 Sep '10, 19:11