Commands & Syntax > Commands > File Mainpulation >

www.perfectkeyboard.com

 

UNZIP - < zip_unzipfile >() ... [Pro]

 

File UNZIP
<zip_unzipfile>("Zip file","Destination","Mask files","Password")
Available in: Professional edition

This command extracts from ZIP file to a folder the files that match defined mask.

 

#

Parameter name

Parameter description

1

Zip file

(Full) path to an existing ZIP file. Example: c:\temp\zipfile.zip.

2

Destination

(Full) path to a folder where the files contained in the ZIP file will be extracted. If the folder does not exist then it is created automatically. Example: c:\temp\unzipDir.

3

Mask files

Wildcard mask to define what files will be extracted. Only mask matching files are extracted. Example: *.txt.

4

Password

If the zip file is password protected then the password parameter is needed to successfully unzip the file.

 

Example (Macro Steps):

 

1

<#> <#> This example shows how to unzip existing ZIP file.

2

<#> <#>

3

Macro execution: ONLY COMMANDS

4

<#> <#> Create folder for sample files

5

Folder CREATE "c:\temp\zip_sample"

6

<#> <#> Create sample files

7

File CREATE "c:\temp\zip_sample\file1.txt"

8

File CREATE "c:\temp\zip_sample\file2.txt"

9

File CREATE "c:\temp\zip_sample\file3.txt"

10

<#> <#> Zip files to a zip file

11

File ZIP "c:\temp\zip_sample\*.txt" to "c:\temp\zip_sample\zipfile.zip", Subfolders = No, Password =

12

<#> <#> Unzip file to folder

13

File UNZIP to "c:\temp\zip_sample\unzip" from "c:\temp\zip_sample\zipfile.zip", Mask files = *.txt, Password =

14

<#> <#> Open folder to see the results

15

Folder OPEN open folder "c:\temp\zip_sample\unzip" in Windows Explorer.

Example (Plain Text):

 

<#> This example shows how to unzip existing ZIP file.

<#>

<cmds>

 

<#> Create folder for sample files

<dircreate>("c:\temp\zip_sample",0)

 

<#> Create sample files

<filecreate>("c:\temp\zip_sample\file1.txt",0)

<filecreate>("c:\temp\zip_sample\file2.txt",0)

<filecreate>("c:\temp\zip_sample\file3.txt",0)

 

<#> Zip files to a zip file

<zip_createfile>("c:\temp\zip_sample\zipfile.zip","c:\temp\zip_sample\*.txt",0)

 

<#> Unzip file to folder

<zip_unzipfile>("c:\temp\zip_sample\zipfile.zip","c:\temp\zip_sample\unzip","*.txt")

 

<#> Open folder to see the results

<diropen>("c:\temp\zip_sample\unzip",0)