Anyone doing SFTP using CFFTP??

317 views
Skip to first unread message

Ken Cameron

unread,
Sep 16, 2010, 4:23:52 PM9/16/10
to cfu...@googlegroups.com
I'm trying to work it out for our CF9 system. I had a way that used the older sftp object and custom tags, which I understand don't work with CF9 although they still worked with CF7 and CF8.

-ken cameron, CCP.
Staff Leasing of CNY Inc 315-641-3600
SkyDiver: Zoo-602, A-8596, D-11839.
Skier: down & cross. English Hunter Rider. Scuba: wet & dry
mailto: kcam...@staffleasing-peo.com Home DZ: FingerLakes Skydivers, Ovid NY


Boyan Kostadinov

unread,
Sep 16, 2010, 5:52:28 PM9/16/10
to cfu...@googlegroups.com
Ken,

had a friend that recently went through this with CF9. You need to get the latest patch updates for CF9 for SFTP to work.
-------------------
Boyan Kostadinov
Blog: http://blog.tech-cats.com


--
You received this message because you are subscribed to the Google Groups "Central New York ColdFusion Users Group" group.
To post to this group, send email to cfu...@googlegroups.com.
To unsubscribe from this group, send email to cfugcny+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfugcny?hl=en.


Michael Sprague

unread,
Sep 16, 2010, 5:59:58 PM9/16/10
to cfu...@googlegroups.com
Ken,

Here is an example of how we are using it.

<cfset objFTPProperties = {
Server = "sftp.bserver.com",
Port = "22",
Username = "myusername",
Password = "mypassword",
Secure = true
} />

<cftry>

<!--- Open the connection. --->
<cfftp
action="open"
connection="objConnection"
attributeCollection="#objFTPProperties#"
/>

<!--- "Put" the files to the connection. --->
<cfftp
action="putfile"
connection="objConnection"
localfile="#firstfilepath#"
remotefile="#GetFileFromPath( firstfilepath )#"
transfermode="auto"
/>
<cfftp
action="putfile"
connection="objConnection"
localfile="#secondfilepath#"
remotefile="#GetFileFromPath( secondfilepath )#"
transfermode="auto"
/>
 
<!--- Close the connection. --->
<cfftp
action="close"
connection="objConnection"
/>
<cfcatch type="any">
<cfmail to="noti...@mydomain.com" from="sft...@mydomain.cfm" subject="JOB FAILED TO DELIVER FILES" type="html">
<p>
There was an error uploading the <your app name here> files to the sFTP server.  Details below.
</p>
<cfdump var="#cfcatch#" />
</cfmail>
</cfcatch>

</cftry>

Hope that helps,
Mike

Jerome Fluellen

unread,
Jun 9, 2016, 2:58:36 PM6/9/16
to Central New York ColdFusion Users Group
This helped me Mike! I was able to connect.  Thanks 
Reply all
Reply to author
Forward
0 new messages