{"id":93,"date":"2014-08-13T09:59:54","date_gmt":"2014-08-13T13:59:54","guid":{"rendered":"http:\/\/salzlechner.com\/dev\/?p=93"},"modified":"2016-03-11T07:14:09","modified_gmt":"2016-03-11T12:14:09","slug":"sftp-upload-using-chilkat","status":"publish","type":"post","link":"http:\/\/salzlechner.com\/dev\/2014\/08\/13\/sftp-upload-using-chilkat\/","title":{"rendered":"SFTP Upload using Chilkat"},"content":{"rendered":"<pre class=\"lang:default decode:true  \" abp=\"2351\">Integer iRetVal\r\nInteger hoSFTP\r\n\r\nGet Create (RefClass(cComChilkatSFtp)) to hoSFTP\r\nGet ComUnlockComponent of hoSFTP \"license\" to iRetVal\r\n\r\nSet ComConnectTimeoutMs of hoSFTP to 5000\r\nSet ComIdleTimeoutMs of hoSFTP to 10000\r\n\r\nString sHostName\r\nMove \"hostname\" to sHostName\r\nGet ComConnect of hoSFTP sHostName 22 to iRetVal\r\nIf (iRetVal&lt;&gt;1) Begin\r\n    Send Info_Box (ComLastErrorText(hoSFTP))\r\n    Send Destroy to hoSFTP\r\n    Function_Return (False)                \r\nEnd\r\n                       \r\nGet ComAuthenticatePw of hoSFTP \"user\" \"password\" to iRetVal            \r\nIf (iRetVal&lt;&gt;1) Begin\r\n    Send Info_Box (ComLastErrorText(hoSFTP))\r\n    Send Destroy to hoSFTP\r\n    Function_Return (False)\r\nEnd\r\n    \r\nGet ComInitializeSftp of hoSFTP to iRetVal            \r\nIf (iRetVal&lt;&gt;1) Begin\r\n    Send Info_Box (ComLastErrorText(hoSFTP))\r\n    Send Destroy to hoSFTP\r\n    Function_Return (False)\r\nEnd\r\n\r\nInteger STatPnl\r\nMove (Status_Panel(Self)) to StatPnl\r\n\/\/Set Allow_Cancel_State of StatPnl to false\r\nSend Initialize_StatusPanel of StatPnl \"Uploading File\" \"Please Wait\" \"\"\r\nSend Start_StatusPanel of StatPnl\r\n        \r\nGet ComUploadFileByName of hoSFTP \"upload.txt\" \"c:\\dx\\upload.txt\" to iRetVal\r\nIf (iRetVal&lt;&gt;1) Begin\r\n    Send Stop_StatusPanel of StatPnl\r\n    Send Info_Box (ComLastErrorText(hoSFTP))\r\n    Send Destroy to hoSFTP\r\n    Function_Return (False)\r\nEnd\r\n        \r\nSend Stop_StatusPanel of StatPnl\r\n        \r\nSend ComDisconnect to hoSFTP\r\n            \r\nSend Destroy to hoSFTP<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>this post shows how to use the Chilkat control in DataFlex to upload a file to an SFTP server<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-dataflex"],"_links":{"self":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":4,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":288,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/93\/revisions\/288"}],"wp:attachment":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}