Skip to content

Instantly share code, notes, and snippets.

@technomaz
Created December 30, 2014 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technomaz/b3c1de31f68541f550c0 to your computer and use it in GitHub Desktop.
Save technomaz/b3c1de31f68541f550c0 to your computer and use it in GitHub Desktop.
Use winscp in cfexecute to upload file to linux server
<cfexecute name="C:\download\WinScp\winscp.com" arguments="/command ""open sftp://user:pass@yourserver.com"" ""put c:\full\path\to\file.txt /usr/local/remote/dir/"" ""exit""" variable="result" errorvariable="errorv" timeout="10"></cfexecute>
<cfoutput>
<cfif len(errorv)>
<h1>Error</h1>
<pre>#errorv#</pre>
<cfelse>
<h1>Result</h1>
<pre>#result#</pre>
</cfif>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment