Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

"No such file" error when using OpenFile with createTruncate

$
0
0

I'm trying to create or truncate a file on the server (original code in FoxPro), but I'm getting the following response. I had changed the disposition to "createTruncate,deleteOnClose" when this started, and I removed deleteOnClose back out, but I am still receiving this message:

SftpVersion: 3
sftpOpenFile:
remotePath: (IP address cleared for security)/FTPTEST.TXT
access: readWrite
createDisposition: createTruncate
v3Flags: 0x1b
Sent FXP_OPEN
StatusResponseFromServer:
Request: FXP_OPEN
InformationReceivedFromServer:
StatusCode: 2
StatusMessage: No such file
Actual code is as follows:
lcTargetFile = lcServerName + lcFoldername + "FTPTEST.TXT"
oSFTP.CONNECT(lcServerName,lnFTPPort)
oSFTP.AuthenticatePW(lcServerUID, lcServerPwd)
oSFTP.InitializeSFTP()
lnHandle = oSFTP.OpenFile(lcTargetFile,"readWrite","createTruncate")
My handle at this point is an empty string, and the LastErrorText returns the above. Any hints or help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 1061

Trending Articles