ZipExtract_To_Folder

Extracts a Zip Archive to a new or existing folder

  • Stored Procedure
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

EXEC SQLHTTP.net.ZipExtract_To_Folder @ZipFilePath, @ZipExtractFolderPath, [@SelectedEntryFullPath], [@Override]

Arguments:

Name Type Description
@ZipFilePath varchar(400) Required. Full path to an existing zip file
@ZipExtractFolderPath varchar(4000) Required. Full path to a new or existing folder. If the folder does not exist, it will be created
@SelectedEntryFullPath varchar(4000) Optional. A path within the zip archive of a file or folder to be extracted. Leave blank to extract all files and folders
@Override bit Optional. An indicator as to whether existing files and folders in the ZipExtractFolderPath will be overridden. Default: 1 (True)

Remarks:

Accessing the file system will be performed in the context of the SQL Server instance process. You can set SQL Server to run using a specific network account, or a Local System Account.

Sample Usage:

Extracts the entire content of a zip archive:
Extracts a selected folder in a zip archive:

See Also: