Guest User

Untitled

a guest
Dec 6th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. <cfSet variables.error = "" />
  2. <cfFtp connection="schedulePDFTransfer" action="open" server="#variables.ftpServer#" username="cfftp" password="xbR1n71$" stoponerror="yes" />
  3. <cfIf cfFtp.succeeded>
  4. <cfFtp connection="schedulePDFTransfer" action="changeDir" directory="/www/gvsu/schedule/files/yearfiles" stopOnError="yes" />
  5. <cfIf cfFtp.succeeded>
  6. <cfFtp connection="schedulePDFTransfer" action="existsFile" remoteFile="#variables.yearFile#.pdf" />
  7. <cfIf cfFtp.succeeded AND cfFtp.returnValue>
  8. <cfFtp connection="schedulePDFTransfer" failIfExists="no" action="getFile" localFile="/www/gvsu/schedule_pdf/files/yearfiles/#variables.yearFile#.pdf" remoteFile="#variables.yearFile#.pdf" stopOnError="yes" />
  9. <cfIf cfFtp.succeeded>
  10. <cfFtp connection="schedulePDFTransfer" action="changeDir" directory="/www/gvsu/schedule/files/instructionfiles" stopOnError="yes" />
  11. <cfIf cfFtp.Succeeded>
  12. <cfFtp connection="schedulePDFTransfer" action="existsFile" remoteFile="#url.term#.pdf" />
  13. <cfIf cfFtp.succeeded AND cfFtp.returnValue>
  14. <cfFtp connection="schedulePdfTransfer" failIfExists="no" action="getFile" localFile="/www/gvsu/schedule_pdf/files/instructionfiles/#url.term#.pdf" remoteFile="#url.term#.pdf" stopOnError="yes" />
  15. <cfIf NOT cfFtp.succeeded>
  16. <cfSet variables.error = cfFtp.errorText />
  17. <cfSet variables.errorDescription = "Could not get file - instruction file" />
  18. </cfIf>
  19. <cfElse>
  20. <cfSet variables.error = cfFtp.errorText />
  21. <cfSet variables.errorDescription = "File not found - instruction file" />
  22. </cfIf>
  23. <cfElse>
  24. <cfSet variables.error = cfFtp.errorText />
  25. <cfSet variables.errorDescription = "Could not change directory - instruction files" />
  26. </cfIf>
  27. <cfElse>
  28. <cfSet variables.error = cfFtp.errorText />
  29. <cfSet variables.errorDescription = "Could not get file - year file" />
  30. </cfIf>
  31. <cfElse>
  32. <cfSet variables.error = cfFtp.errorText />
  33. <cfSet variables.errorDescription = "File not found - year file" />
  34. </cfIf>
  35. <cfElse>
  36. <cfSet variables.error = cfFtp.errorText />
  37. <cfSet variables.errorDescription = "Could not change directory - year files" />
  38. </cfIf>
  39. <cfElse>
  40. <cfSet variables.error = cfFtp.errorText />
  41. <cfSet variables.errorDescription = "Could not establish connection" />
  42. </cfIf>
Add Comment
Please, Sign In to add comment