ZipEntryRemove
Removes files and folders from a zip archive
- Stored Procedure
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
EXEC SQLHTTP.net.ZipEntryRemove @ZipFilePath, @ZipEntryPath
Name | Type | Description |
---|---|---|
@ZipFilePath | varchar(4000) | Full path to an existing zip archive |
@ZipEntryPath | varchar(4000) | Full path to a file or folder within the zip archive. A folder name should be include a forward slash at the end as shown in the example below. |
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.
Removes a file from a zip archive:
1 2 3 4 5 |
EXEC SQLHTTP.net.ZipEntryRemove @ZipFilePath = 'C:\ThisFolderExists\ZipFile.zip', @ZipEntryPath = 'SomeFile.txt' |
1 2 3 |
Commands completed successfully. |
Removes a folder and its content from a zip archive:
1 2 3 4 5 |
EXEC SQLHTTP.net.ZipEntryRemove @ZipFilePath = 'C:\ThisFolderExists\ZipFile.zip', @ZipEntryPath = 'NestedSubfolder/' |
1 2 3 |
Commands completed successfully. |
- CodePageEncodings
- FileCopy
- FileDecrypt
- FileDelete
- FileEncrypt
- FileMove
- FileRead
- Files_To_Table
- FileWrite
- FolderCopy
- FolderCreate
- FolderDelete
- FolderMove
- Folders_To_Table
- GlobalTable_To_File
- IsExistingFile
- IsExistingFolder
- TempPath
- ZipEntryAppend
- ZipEntryRemove
- ZipExtract_To_Folder
- ZipExtract_To_Table