Skip to main content
WarrenJMeyer
Participant
November 13, 2014
Question

Help!!!! I am getting a 501 Syntax Error with CFFTP ListDir. I created the file in January of 2014 and today is the first time it has failed.

  • November 13, 2014
  • 1 reply
  • 278 views

<!---Control the timeout--->

<cfsetting requesttimeout="600">

<cfset thisDate = now()>

<cfset today = #DateFormat(thisDate,"mm-dd-yyyy")#>

<!--- Open ftp connection --->

<cfftp connection="MyFtp"

    server="#FTPserver#"

    username="#username#"

    password="#password#"

    action="Open"

    stoponerror="Yes">

   

<cfftp action="listdir"

stopOnError="Yes"

name="Files"

directory="/export400"

connection="MyFtp"

>

This topic has been closed for replies.

1 reply

Carl Von Stetten
Legend
November 14, 2014

Try removing the quotes from around the connection name in your CFFTP lisdir block.  So change the last line to connection=MyFtp instead of connection="MyFtp".

-Carl V.