Question:
I’m using the FTP Activex. you only have examples of changing the remote directory.. How do I download to a specific local directory?
Answer:
The GetFile method accepts two arguments, a remote filename, and a local filename:
bool GetFile(string remoteFilename, string localFilename);
The localFilename can include a path, relative or absolute. For example:
success = ftp2.GetFile("test.txt","c:/temp/test.txt");
success = ftp2.GetFile("test.txt","../xyz/test.txt");
If you don’t include a path for the localFilename, the file will appear in the calling process’s current working directory.
Note: Any Chilkat method that accepts a filename for an argument can be considered to implicitly accept an absolute or relative filepath as well.