Unzip files

Verb: unzip

Available from: <Standard>

Uncompresses files from a ".zip" file to the directory inserted in the script.

Syntax

unzip --file(String) --destinationfolder(String) [--filemask(String)]

Inputs

Script Designer Required AcceptedTypes Description
--file File Required Text Path to the ".zip" file that should be unzipped.
--destinationfolder Destination directory Required Text Destination directory the file will be extracted to.
--filemask File filter Optional Text Filter that will be applied in the search. It must be inserted as follows: [Name or part of the file name, spaces are not accepted in this part]. [File extension]. Here are some examples:
  • *.txt: filters all files with the ".txt" extension;
  • name: filters all files that have the word "name" as part of the name.

  • When entering the name of the file, it must be case sensitive.

    Example

    After obtaining the "Desktop" directory with the Get System Folder Path command, the Create Directory command creates a directory called "Test Folder", and the Unzip files command unzips ".txt" files from a ".zip" to the created directory.

    defVar --name desktop --type String
    defVar --name createdDirectory --type String
    getSpecialFolder --folder "Desktop" desktop=value
    createDir --path "${desktop}\\Test Folder" createdDirectory=value
    unzip --file "testFileIBM.zip" --destinationfolder "${createdDirectory}"
    logMessage --message "Directory where the unzipped file was saved: ${createdDirectory}" --type "Info"
    // The "logMessage" command displays the path to the directory where the unzipped file was saved.
    
    Download File

    See Also

  • Zip Files