Method: Unzip for DataPlugin
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Unzip for DataPlugin
Method: Unzip for DataPlugin
Unzips a ZIP archive to a specified folder. The unzipped files are automatically deleted as soon as the DataPlugin no longer requires these files.
vUnzip = Object.Unzip(ZipArchive, TargetFolder)
| Object | DataPlugin Object with this method |
| ZipArchive | String Specifies the name of the ZIP archive. |
| TargetFolder | String Specifies the name of the target folder. |
| vUnzip | Variant Receives a one-dimensional array with the name of the unzipped files. The path of these files is specified relative to the target folder. |
The following example creates a temporary folder and unzips the ZIP archive FileName in this folder. Then the example imports the data of the first file with the load method described in the ATFX DataPlugin:
Sub ReadStore(FileName) Dim TempFolder TempFolder = AutoRemove.CreateFolder() Dim FileList FileList = Unzip(FileName, TempFolder) Call Root.ImportStore(TempFolder & FileList(0), "ATFX") End Sub