Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: How 2 easiest

Posts: 1
Registered: 10/16/2005
Member Is Offline
posted on 10/16/2005 at 08:10 PM Reply With Quote
How 2 easiest

I want to unzip a file by looping through it, like this

for each file in zip (not sure how to iterate the zip file)
if file.ext inst(...) then (??)
1) allow to unzip
2) insert into db (got this covered)
end if

need to delete the zip file (??)
need to delete the temp folder it creates (?)

View User's Profile View All Posts By User U2U Member

Posts: 23
Registered: 11/19/2004
Member Is Offline
posted on 7/2/2006 at 04:03 AM Reply With Quote

See the example below:

ZipFileName = Server.MapPath("/temp/") 'Get loacation of your zip file
UnzipPath = Server.MapPath("/temp") 'Get destination path

Set Zip = CreateObject("SoftComplex.Zip")

Zip.Open ZipFileName
Zip.Read 'Read zip file content

for I = 0 To Zip.Count - 1
if InStr(Zip.FileName, ".exe") > 0 then
Zip.Selected[I] = True 'Select file to be extracted
PostSomeThingToDatabase Zip.FileFullName
End If

if Zip.SelectedCount > 0 then 'If any file selected then extract
Zip.DestDirectory = UnzipPath 'Set destination path
FileCount = Zip.UnzipSelected 'Unzip selected files
End If
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Free Download Free Download
Product Documentation Documentation
Documenation Page
Code Samples
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart

Go To Top

Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004