https://github.com/rcdmk/aspzip
A classic ASP zip and unzip utility class that uses the native zip support from Windows (XP and above) - no components needed
https://github.com/rcdmk/aspzip
asp asp-zip classic-asp unzip utility zip
Last synced: 3 months ago
JSON representation
A classic ASP zip and unzip utility class that uses the native zip support from Windows (XP and above) - no components needed
- Host: GitHub
- URL: https://github.com/rcdmk/aspzip
- Owner: rcdmk
- Created: 2012-11-11T04:09:42.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T06:42:02.000Z (over 1 year ago)
- Last Synced: 2025-03-11T08:36:02.879Z (7 months ago)
- Topics: asp, asp-zip, classic-asp, unzip, utility, zip
- Language: Classic ASP
- Size: 8.79 KB
- Stars: 25
- Watchers: 5
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Classic ASP ZIP file creator 0.4
## The MIT License (MIT) - http://opensource.org/licenses/MIT
Copyright (c) 2012 RCDMK <rcdmk@rcdmk.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.## Usage
Include the class file in the desired page and instantiate the class
dim zip
set zip = new aspZipOpen a ZIP file (create or open an existing file in disk)
zip.OpenArchieve("path\to\file.zip") ' this creates the archieve if it doesn't existsAdd some files or folders
zip.Add("..\src")
zip.Add(".\default.asp")
Write the files to diskzip.CloseArchieve()
If you want to extract the contents of a ZIP file, use the `ExtractTo(DestinationPath)` method
zip.ExtractTo(".\test")
If the archieve contains no files, it will be deleted when the object is destroyed.
>**Note:**
>In the current release (0.4) the issue with extracting only directory structures should be solved, but processing times are a lot longer now, due to waiting on directory creation. Minimum extra waiting time is 500 ms.