login about faq

Hi Sir,

I know that SFTP is different from FTP, the way it works and everything. However I want to use SFTP to create a directory on the server and upload a file to that directory. Example: SFTP Server path is Statements/Personal. In Personal I want to create directory "03-2017". In directory "03-2017" I want to upload file "test.txt". Let's assume I established the connection already...what would be the code to achieve this please since I cannot change directory to the newly created "03-2017" folder and this is dynamically created?

Thanks, Justin

asked Jul 07 at 10:26

justinF's gravatar image

justinF
312


You would call sftp.CreateDir("Statements/Personal/03-2017") to create the "03-2017" directory in "Statements/Personal".

link

answered Jul 11 at 10:56

chilkat's gravatar image

chilkat ♦♦
12.7k317362463

Hi Sir, thanks but the actual question was how do change your current directory without re-connecting?

(Jul 12 at 06:43) justinF
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:

×223
×54
×23
×11
×4

Asked: Jul 07 at 10:26

Seen: 622 times

Last updated: Jul 12 at 06:43

powered by OSQA