Zip
This function allow to zip/unzip files.
select [dbo].[Zip]('c:\pathfrom','zipfile.zip','pathto','-1')
select [dbo].[Zip]('c:\pathfrom,c:\pathfrom\file1.txt,c:\pathfrom2\','zipfile.zip','pathto','0')
parameters:
@pathFrom:
it's the directory where zip is(unzip case) or the directory/file to zip(zip case)
@zip:
it's the zip file
@pathTo:
it's the destionation folder where extract files(unzip case) or where create the zip file(zip case)
@level:
it's the compression level
- <0 -> process as unzip case
- 1/9 -> process a zip case and value is the compression level