login about faq

I am getting a file not found error. The Realpath(".","") returns null and sometimes "/" but not ".". It works for other users on the same SFTP server however it fails for this one. The "/test/Monthly_files_012014/test.mat" is the correct path however it seems to be substituting "./test/Monthly_files_012014/test.mat". Why would this not work? I have tried both 9.1.2 and 9.5.0.39 chilkatDontNet2 versions and both DownloadFileByName and OpenFile-DownloadFile methods.

C# code:
  _sftp.RealPath(ftpf.SourcePath + "/" + ftpf.FileName,"")
produces:
  "/test/Monthly_files_012014/test.mat"

C# code:
success = _sftp.DownloadFileByName(_sftp.RealPath(ftpf.SourcePath + "/" + ftpf.FileName,""), destfilepath);
Produces the below error:
"ChilkatLog:
 DownloadFileByName:
   DllDate: May  8 2014
   ChilkatVersion: 9.5.0.39
   UnlockPrefix: XXXXXXX
   Username: XXXXXXX
   Architecture: Little Endian; 32-bit
   Language: .NET 2.0
   VerboseLogging: 0
   SshVersion: SSH-2.0-1.82_sshlib
   SftpVersion: 3
   downloadFileByName:
     PreserveDate: 0
     fromFilePath: /test/Monthly_files_012014/test.mat
     toFilePath: Download\\test.mat
     OpenRemoteFile:
       sftpOpenFile:
         remotePath: /test/Monthly_files_012014/test.mat
         access: readOnly
         createDisposition: openExisting
         v3Flags: 0x1
         Sent FXP_OPEN
         StatusResponseFromServer:
           Request: FXP_OPEN
           InformationReceivedFromServer:
             StatusCode: 2
             StatusMessage: File not found
           --InformationReceivedFromServer\
          --StatusResponseFromServer
         retryFilepath: ./test/Monthly_files_012014/test.mat
         remotePath: ./test/Monthly_files_012014/test.mat
         access: readOnly
         createDisposition: openExisting
         v3Flags: 0x1
         Sent FXP_OPEN
         StatusResponseFromServer:
           Request: FXP_OPEN
           InformationReceivedFromServer:
             StatusCode: 2
             StatusMessage: File not found
           --InformationReceivedFromServer
         --StatusResponseFromServer
       --sftpOpenFile
       timeToOpenMs: Elapsed time: 156 millisec
     --OpenRemoteFile
     totalTimeMs: Elapsed time: 156 millisec
   --downloadFileByName
   Failed.
 --DownloadFileByName
--ChilkatLog"

asked Jun 11 '14 at 13:59

tjtf5's gravatar image

tjtf5
112

edited Jun 11 '14 at 14:36

Be the first one to answer this question!
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:

×200

Asked: Jun 11 '14 at 13:59

Seen: 830 times

Last updated: Jun 11 '14 at 14:36

powered by OSQA