Created
December 30, 2014 22:26
-
-
Save technomaz/b3c1de31f68541f550c0 to your computer and use it in GitHub Desktop.
Use winscp in cfexecute to upload file to linux server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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