Hi All
I'm trying to get my CF server to FTP files to another server. I can connect
ok but cannot put files.
*My code:*
<cfdirectory directory="#request.dataArchiveLocation#" action="list"
filter="*.rar" name="archiveList" />
<cfoutput>
<p>
<h1>Files to transfer:</h1>
<cfloop query="archiveList">
#archiveList.name#<br />
</cfloop>
</p>
<cfftp connection = "backupFTP"
username = "#request.username#"
password = "#request.password#"
server = "#request.server#"
action = "open"
stopOnError = "No">
<p>Connection success: #cfftp.succeeded#</p>
<cfloop query="archiveList">
<p>
Transferring #archiveList.directory#\#archiveList.name#...<br />
Exists: #fileexists("#archiveList.directory#\#archiveList.name#")#<br />
<cfflush>
<cfftp
connection = "backupFTP"
action = "putFile"
localFile = "#archiveList.directory#\#archiveList.name#"
remoteFile = "#archiveList.name#">
Done: #cfftp.succeeded#
</p>
</cfloop>
</cfoutput>
*Page output:*
Files to transfer:
Data Sources 23_11_07.rar
Data Sources 24_11_07.rar
Data Sources_old.rar
Connection success: YES
Transferring C:\Inetpub\Data Sources\backup\Data Sources 23_11_07.rar...
Exists: YES
Done: NO
struct (cfftp dump)
ErrorCode -1
ErrorText An error occurred during the FTP putFile operation.
ReturnValue NO
Succeeded NO
I can connect to the FTP server (from the server) no problem. Does anyone
have any ideas? The connection is being established ok, the file exists,
permissions on the files are fine.
Where do I go from here?
Thanks
--
Giles Roadnight
http://giles.roadnight.name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293909
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4