#ARCHIVELIST
Syntax
#ARCHIVELIST(Data) ... #ENDARCHIVELIST
Parameters
- Data - Variable that contains archive data, such as the contents of a Zip, tar or Gzip file.
Description
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.
This statement does not produce output.
Example 1 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>
Analysis
In this example, a ZIP file is decompressed to the current directory and each file is listed with a link to the decompressed file.