DIAdem Help

Method: Unzip for DataPlugin

  • Updated2024-09-12
  • 1 minute(s) read

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)
ObjectDataPlugin
Object with this method
ZipArchiveString
Specifies the name of the ZIP archive.
TargetFolderString
Specifies the name of the target folder.
vUnzipVariant
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

Log in to get a better experience