Did you open the connection first?

<cfftp action="OPEN"
       server="ftp.someserver.com" 
       username="myusername"
       password="mypassword"
       stoponerror="Yes"
       connection="FTP">

I believe that if you're going to do an FTP operation, you need to open the
connection first (or, at least if you're going to use the "connection"
attribute and name a connection, that is referring to a connection you
opened as above).

H.



> -----Original Message-----
> From: Chris Edwards [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 1:00 PM
> To:   CF-Talk
> Subject:      why can't I run an ftp batch?
> 
> Hi
> 
> I can't figure out what I'm doing wrong.  Would someone help?
> 
> I keep getting this:
> The CONNECTION attribute you specified, 'FTP', is invalid or does not
> exist.
> 
> This is what I'm using:
> 
> <cfftp connection="FTP"
>        server="ip"
>        username="name"
>        password="pass"
>        action="LISTDIR"
>        directory="test-list"
>        name="myfiles"
>        stoponerror="no">
> 
> <cfoutput>#cfftp.Succeeded#</cfoutput><br>
> <cfoutput>#cfftp.ErrorCode#</cfoutput><br>
> <cfoutput>#cfftp.ErrorText#</cfoutput><br>
> 
> <P>Directory of files
> 
> <cftable border="yes" htmltable="yes" query="myfiles">
>   <cfcol header="name" text="#name#" align="left">
>   <cfcol header="length" text="#length#" align="right">
> </cftable>
> 
> <cfftp connection=FTP
>        action="PUTFILE"
>        localfile="users.bak"
>        remotefile="users.bak">
> 
> <cfoutput>#cfftp.Succeeded#</cfoutput><br>
> <cfoutput>#cfftp.ErrorCode#</cfoutput><br>
> <cfoutput>#cfftp.ErrorText#</cfoutput><br>
> 
> 
> Thanks!
> 
> --
> Chris Edwards
> Web Application Developer
> Outer Banks Internet, Inc.
> 252-441-6698
> [EMAIL PROTECTED]
> http://www.OuterBanksInternet.com
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to