Commands & Syntax > Commands > File Mainpulation >

www.perfectkeyboard.com

 

CREATE SELF-EXTRACTING ZIP - < zip_create_sfx >() ... [Pro]

 

File CREATE SELF-EXTRACTING ZIP
<zip_create_sfx>("Self-extracting file","Files to archive",Subfolders,"Startup file",Option,"Password")
Available in: Professional edition

This command archives one or multiple files to a single self-extracting ZIP file.

 

#

Parameter name

Parameter description

1

Self-extracting file

(Full) path to the self-extracting ZIP file to be created. Example: c:\temp\zipfile-se.exe.

2

Files to archive

(Full) file path or wildcard mask of files that will be included (zipped) to the ZIP file. Example: c:\temp\*.txt.

3

Subfolders

If 1, also files from subfolders that match the "Input files mask" are included.
If 0, the files from subfolders are not included.

4

Startup file

Full path of the file to automatically open when the self-extracting ZIP file finishes files extraction. Example: c:\temp\readme.txt.

5

Option

If 1, the files are extracted automatically to the default temporary folder.
If 0, the user will select the folder where to extract the files.

6

Password

If a password is provided then the exe file created is password protected.

 

Example (Macro Steps):

 

1

<#> <#> This example shows how to create self-extracting 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

<#> <#> Create self-extracting ZIP file

11

File CREATE SELF-EXTRACTING ZIP "c:\temp\zip_sample\zipfile-selfextract.exe" from "c:\temp\zip_sample\*.txt", Subfolders = No, Startup file = c:\temp\zip_sample\file1.txt, Option = User will select destination folder, Password =

12

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

13

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

Example (Plain Text):

 

<#> This example shows how to create self-extracting 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)

 

<#> Create self-extracting ZIP file

<zip_create_sfx>("c:\temp\zip_sample\zipfile-selfextract.exe","c:\temp\zip_sample\*.txt",0,"c:\temp\zip_sample\file1.txt",0)

 

<#> Open folder to see the results

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