login about faq

I am getting "file not found issue" with the following error message.But i am able to move( if (!sftp.RenameFileOrDir(@"OutputADV_MSB_20150602.xlsx", @"ArchiveADV_MSB_20150602.xlsx"))) the file using a console application.Need help on this issue

    DllDate: Oct 29 2015
    UnlockPrefix: CORLGCSSH
    Username: ADVQN1VTAPEVT18:FASLOEvents
    Architecture: Little Endian; 64-bit
    Language: .NET 4.0 / x64
    VerboseLogging: 0
    SshVersion: SSH-2.0-1.82_sshlib GlobalSCAPE
    SftpVersion: 3
    oldFilename: OutputADV_MSB_20150602.xlsx
    newFilename: ArchiveADV_MSB_20150602.xlsx
      mType: CHANNEL_DATA
      Request: FXP_RENAME
        StatusCode: 2
        StatusMessage: File not found

asked Dec 24 '15 at 05:29

Vasanth%20kumar's gravatar image

Vasanth kumar

edited Dec 24 '15 at 06:06

Gert's gravatar image

Gert ♦

If you do not use full path names, just the file name, SFTP will use the "user's default directory". The file is likely somewhere else.

Make sure to read http://www.cknotes.com/understanding-sftp-absolute-filepaths/

and the documentation for OpenDir: https://www.chilkatsoft.com/refdoc/vcCkSFtpDoc.html#method35 where it says "...An empty path name is valid, and it refers to the user's default directory (usually the user's home directory)..."


answered Dec 24 '15 at 06:12

Gert's gravatar image

Gert ♦

Hello Gert, Actually its not just the file name the file is present in output folder and I need to move to Archive folder Below is the code I am using in console application which moves the file successfully sftp.RenameFileOrDir(@"OutputADV_MSB_20150602.xlsx", @"ArchiveADV_MSB_20150602.xlsx")

But with ASP.Net application I am getting the error oldFilename: \Output\ADV_MSB_20150602.xlsx newFilename: \Archive\ADV_MSB_20150602.xlsx sshReadMessage: mType: CHANNEL_WINDOW_ADJUST InformationReceivedFromServer: StatusCode: 2 StatusMessage: File not found

Thanks for your response

(Dec 24 '15 at 07:00) Vasanth kumar

Did you read http://www.cknotes.com/understanding-sftp-absolute-filepaths/ ? Especially the requirements for SSH on Windows? You probably need a path like /C/Output/ADV_MSB_20150602.xlsx

I am away now.

(Dec 24 '15 at 07:35) Gert ♦

Also SFTP act different whether Windows or Unix. Also Unix behaves different if the file system is mounted.

The two SFTP and FTP should be combined. When you do a Change Directory, the module should be smart enough to figure out the path.

SFTP is really a pain when dealing with other folders. I have to always use a debugger when trying to figure out the server file destinations.


answered Dec 24 '15 at 10:42

cdlvj130's gravatar image


Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Dec 24 '15 at 05:29

Seen: 668 times

Last updated: Dec 24 '15 at 10:42

powered by OSQA