login about faq

Given a directory structure of: / -- certificates -- incoming -- outgoing

I am attempting to uplaod to the "certificates" directory, but no moatter how I specify it, it goings always to "incoming". Is there a way to control the target directory?

My Foxpro code: lnSuccess = this.sftp(this.cLocalSFTPServer,,"INTEK",this.cINTEKSFTPPassword,"/certificates",lower(addbs(justpath(tcCertFile))),,,"UPLOAD",lower(justfname(tcCertFile)))

asked Aug 25 at 12:27

Bob_R's gravatar image

Bob_R
1111


That is an abstraction to use the Chilkat tool.

And it looks like you are passing in an absolute path. If you are wanting to put it in a directory under incoming, you may need to pass in "./certificates" or just "certificates"

http://cknotes.com/understanding-sftp-absolute-filepaths/

HTH, Tracy

link

answered Aug 25 at 13:06

TracyP's gravatar image

TracyP
1062

Thanks, Tracy. I am trying to pass it to the directory under root: "/certificates" and it goes to "incoming", the user home directory

I also tried "certificates","../certificates"

link

answered Aug 25 at 14:02

Bob_R's gravatar image

Bob_R
1111

Here's a couple of things you may need to verify:

  • Does the user have permissions to write to the "certificates" directory?
  • Does the abstraction change to the directory before uploading?

To better help, I'll need to see the abstraction of Chilkat.

link

answered Aug 25 at 14:28

TracyP's gravatar image

TracyP
1062

Windows or Unix Server?

Try the absolute path name /home/user/certificates There is a method to get the absolute path.

The implementation of this is horrible.

If you have virtual folders or mounted/mapped drives (server side) it acts different.

I wish there was one ftp module, and you pass the protocol. and for sftp, you use the cd method, and the lib figures it out.

link

answered Aug 26 at 14:28

cdlvj130's gravatar image

cdlvj130
9691017

Another option would be to have the server side put you in the correct folder when you login, and just upload the file.

link

answered Aug 26 at 14:39

cdlvj130's gravatar image

cdlvj130
9691017

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:

×201
×51
×10
×7

Asked: Aug 25 at 12:27

Seen: 252 times

Last updated: Aug 26 at 14:39

powered by OSQA