webCOMAND

#ARCHIVELIST

Processes the script inside the #ARCHVIELIST COMAND Script Block for each file an archive file.  Each iteration exposes an archived file name and data as $Filename and $Data COMAND Script variables.

Prototype

#ARCHIVELIST($data) ... #ENDARCHIVELIST

Parameters

  • data - Variable that contains archive data, such as the contents of a Zip, tar or Gzip file.

Example

<ul>
#ARCHIVELIST($ZipFile)
    #NEW($Size)#SIZE($Data,StorageLong)#ENDNEW
    <li><a href="#OUTPUT($Filename,$Data)">$Filename</a> $Size</li>
#ENDARCHIVELIST
</ul>

Result

<ul>
      <li><a href="readme.txt">readme.txt</a> 120 bytes</li>
      <li><a href="script.php">script.php</a> 2.5 KB</li>
      <li><a href="images/image1.jpg">images/image1.jpg</a> 1.2 MB</li>
</ul>