@Christoph Rekers Sorry I forgot to attach the new updates,
:set &HND# = PREP_PROCESS_MULTIFILE_vERIFY_UNZIP
:PROCESS &HND#
!Defines the variables to validate the slate_undergrad_dom_coll_transc_export_*.zip files
:DEFINE &remoteFilePathColl#, string
:DEFINE &localFilePathColl#, string
:DEFINE &collFileValid#, unsigned
:SET &remoteFilePathColl# = "/tst_share/kennedytest/slate_undergrad_dom_coll_transc_export_*.zip"
:SET &localFilePathColl# = "/tst_share/kennedytest/unzipped"
:SET &remoteFileSizeColl# = 0
:SET &collFileValid# = 0
!Defines the variables to validate the /apps/prod/slate_undergrad_dom_hs_transc_export_*.zip files
:DEFINE &remoteFilePathHS#, string
:DEFINE &localFilePathHS#, string
:DEFINE &hsFileValid#, unsigned
:SET &remoteFilePathHS# = "/tst_share/kennedytest/slate_undergrad_dom_hs_transc_export_*.zip"
:SET &localFilePathHS# = "/tst_share/kennedytest/unzipped"
:SET &remoteFileSizeHS# = 0
:SET &hsFileValid# = 0
!Defines the variables to validate the slate_undergrad_dom_mat_export_*.zip files
:DEFINE &remoteFilePathMat#, string
:DEFINE &localFilePathMat#, string
:DEFINE &matFileValid#, unsigned
:SET &remoteFilePathMat# = "/tst_share/kennedytest/slate_undergrad_dom_mat_export_*.zip"
:SET &localFilePathMat# = "/tst_share/kennedytest/unzipped"
:SET &remoteFileSizeMat# = 0
:SET &matFileValid# = 0
:PROCESS &remoteFilePathColl#
:PSET &remoteFileSizeColl# = :REMOTE_FILESIZE(&remoteFilePathColl#)
!Confirms the file size is greater than 27KB
:IF &remoteFileSizeColl# GT 27648
:SET &localDownloadStatusColl# = :FTP_DOWNLOAD(&remoteFilePathColl#, &localFilePathColl#)
!Confirms the file exists and prints a message relaying the state of the file
:IF &localDownloadStatusColl# EQ 0
:SET &collFileValid# = 1
:PRINT "File {&remoteFilePathColl#} exists and is larger than 27 KB."
! Add the unzip step here when collFileValid is equal to 1
:IF &collFileValid# EQ 1
:SET &unzipStatus# = ':SHELL("unzip " &localFilePathColl# & "*.zip -o " &localFilePathColl#)'
:IF &unzipStatus# EQ 0
:PRINT "Unzip successful for {&remoteFilePathColl#}."
:ELSE
:PRINT "Error unzipping {&remoteFilePathColl#}."
:ENDIF
:ENDIF
:ELSE
:PRINT "Error downloading file to {&localFilePathColl#}."
:ENDIF
:ELSE
:PRINT "File {&remoteFilePathColl#} does not exist or is not larger than 27 KB."
:ENDIF
:ENDPROCESS
:PROCESS &remoteFilePathHS#
:PSET &remoteFileSizeHS# = :REMOTE_FILESIZE(&remoteFilePathHS#)
!Confirms the file size is greater than 27KB
:IF &remoteFileSizeHS# GT 27648
:SET &localDownloadStatusHS# = :FTP_DOWNLOAD(&remoteFilePathHS#, &localFilePathHS#)
!Confirms the file exists and prints a message relaying the state of the file
:IF &localDownloadStatusHS# EQ 0
:SET &hsFileValid# = 1
:PRINT "File {&remoteFilePathHS#} exists and is larger than 27 KB."
! Add the unzip step here when hsFileValid is equal to 1
:IF &hsFileValid# EQ 1
:SET &unzipStatus# = ':SHELL("unzip " &localFilePathHS# & "*.zip -o " &localFilePathHS#)'
:IF &unzipStatus# EQ 0
:PRINT "Unzip successful for {&remoteFilePathHS#}."
:ELSE
:PRINT "Error unzipping {&remoteFilePathHS#}."
:ENDIF
:ENDIF
:ELSE
:PRINT "Error downloading file to {&localFilePathHS#}."
:ENDIF
:ELSE
:PRINT "File {&remoteFilePathHS#} does not exist or is not larger than 27 KB."
:ENDIF
:ENDPROCESS
:PROCESS &remoteFilePathMat#
:PSET &remoteFileSizeMat# = :REMOTE_FILESIZE(&remoteFilePathMat#)
!Confirms the file size is greater than 27KB
:IF &remoteFileSizeMat# GT 27648
:SET &localDownloadStatusMat# = :FTP_DOWNLOAD(&remoteFilePathMat#, &localFilePathMat#)
!Confirms the file exists and prints a message relaying the state of the file
:IF &localDownloadStatusMat# EQ 0
:SET &matFileValid# = 1
:PRINT "File {&remoteFilePathMat#} exists and is larger than 27 KB."
! Add the unzip step here when matFileValid is equal to 1
:IF &matFileValid# EQ 1
:SET &unzipStatus# = ':SHELL("unzip " &localFilePathMat# & "*.zip -o " &localFilePathMat#)'
:IF &unzipStatus# EQ 0
:PRINT "Unzip successful for {&remoteFilePathMat#}."
:ELSE
:PRINT "Error unzipping {&remoteFilePathMat#}."
:ENDIF
:ENDIF
:ELSE
:PRINT "Error downloading file to {&localFilePathMat#}."
:ENDIF
:ELSE
:PRINT "File {&remoteFilePathMat#} does not exist or is not larger than 27 KB."
:ENDIF
:ENDPROCESS
:ENDPROCESS &HND#