Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfSet variables.error = "" />
- <cfFtp connection="schedulePDFTransfer" action="open" server="#variables.ftpServer#" username="cfftp" password="xbR1n71$" stoponerror="yes" />
- <cfIf cfFtp.succeeded>
- <cfFtp connection="schedulePDFTransfer" action="changeDir" directory="/www/gvsu/schedule/files/yearfiles" stopOnError="yes" />
- <cfIf cfFtp.succeeded>
- <cfFtp connection="schedulePDFTransfer" action="existsFile" remoteFile="#variables.yearFile#.pdf" />
- <cfIf cfFtp.succeeded AND cfFtp.returnValue>
- <cfFtp connection="schedulePDFTransfer" failIfExists="no" action="getFile" localFile="/www/gvsu/schedule_pdf/files/yearfiles/#variables.yearFile#.pdf" remoteFile="#variables.yearFile#.pdf" stopOnError="yes" />
- <cfIf cfFtp.succeeded>
- <cfFtp connection="schedulePDFTransfer" action="changeDir" directory="/www/gvsu/schedule/files/instructionfiles" stopOnError="yes" />
- <cfIf cfFtp.Succeeded>
- <cfFtp connection="schedulePDFTransfer" action="existsFile" remoteFile="#url.term#.pdf" />
- <cfIf cfFtp.succeeded AND cfFtp.returnValue>
- <cfFtp connection="schedulePdfTransfer" failIfExists="no" action="getFile" localFile="/www/gvsu/schedule_pdf/files/instructionfiles/#url.term#.pdf" remoteFile="#url.term#.pdf" stopOnError="yes" />
- <cfIf NOT cfFtp.succeeded>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "Could not get file - instruction file" />
- </cfIf>
- <cfElse>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "File not found - instruction file" />
- </cfIf>
- <cfElse>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "Could not change directory - instruction files" />
- </cfIf>
- <cfElse>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "Could not get file - year file" />
- </cfIf>
- <cfElse>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "File not found - year file" />
- </cfIf>
- <cfElse>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "Could not change directory - year files" />
- </cfIf>
- <cfElse>
- <cfSet variables.error = cfFtp.errorText />
- <cfSet variables.errorDescription = "Could not establish connection" />
- </cfIf>
Add Comment
Please, Sign In to add comment