This content has been marked as final. Show 6 replies
You should be able to loop though and just use the getFile to copy all the files you need.
<CFSET newFeedDir = GetDirectoryFromPath(GetTemplatePath()) & "test\">
You could use CFDIRECTORY to get a list of all the files in the directory, loop through the list and download the file.
James74, cfdirectory is for local file transfer, whereas Scott wishes to get the file from a remote FTP server. It's a natural oversight that happens to all of us.
Amers, your code is the kind I would use. Shouldn't the second cfftp tag, with action="open", come first? Also, should there be a forward slash in the value of the RemoteFile attribute? I would suggest ending the code with the cfftp tag,
<cfftp action="close" connection="myConnection">
BKBK, you're right.. you do want to close the connection after you're finished. Also, basically under remotefile - you should put whatever the directory structure is on the other side. In this case, I used "/" - because I had actually used this in a script I wrote.
BKBK's right about CFDIRECTORY. But you could use <CFFTP ACTION="listdir" ...> on the remote server to achieve the same results.