======Spam Filter Rules: ZipCount====== ^Statement |ZipCount | ^Version |6.7+ | ^Purpose |Enables the script to obtain the number of files contained in a ZIP attachment | The **ZipCount** statement requires a message section number and variable name, in the format ZipCount * If the message section doesn't contain a ZIP attachment, then the variable will be set to '-1' * If the message section does contain a ZIP attachment, then the variable will be set to the number of files in the ZIP attachment =====Example===== The following example will iterate through the MIME sections and get the ZIP file content count into a variable ${zipcount} ForEach MimeSection SectionInfo IfMatch ${SectionInfo} "/^(\d+):([\d\. ]*):([^:]*)/" ${SectionId} = ${1} ${SectionType} = ${3} If ${SectionType} == "application/zip" ZipCount ${SectionId} zipcount EndIf EndIf EndForEach