473,379 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Unzip a file

Good evening all,
using a XP pro platform and Access 2003 SP2, is it possible to identify
a .zip file, inflate the file and then import the contents? I'm pretty
certain I could code steps 1 & 3 but over an hour of googling, I haven't
found anything which has been of any help.

Thanks in advance,

Mark
Jul 10 '07 #1
7 8302
On Jul 10, 4:03 pm, "Mark" <mreed1...@ntlworld.comwrote:
Good evening all,
using a XP pro platform and Access 2003 SP2, is it possible to identify
a .zip file, inflate the file and then import the contents? I'm pretty
certain I could code steps 1 & 3 but over an hour of googling, I haven't
found anything which has been of any help.

Thanks in advance,

Mark
Please see if this helps

http://groups.google.com/group/micro...6f06d859a21886

AFAICS involves using VBS to invoke OS command "compact" with command
line switches to uncompress a given file.
Jul 10 '07 #2
Hi Chris,
apologies again for not being clear in my original post. The link you
have sent worked as you stated but instead of compressing a file by setting
it's advanced properties to "Compress contents to save disc space" = TRUE, I
want to be able to extract the contents of a .zip file which this code does
not do :o(

Many thanks,

Mark
"Chris L." <di******@uol.com.arwrote in message
news:11**********************@o61g2000hsh.googlegr oups.com...
On Jul 10, 4:03 pm, "Mark" <mreed1...@ntlworld.comwrote:
>Good evening all,
using a XP pro platform and Access 2003 SP2, is it possible to
identify
a .zip file, inflate the file and then import the contents? I'm pretty
certain I could code steps 1 & 3 but over an hour of googling, I haven't
found anything which has been of any help.

Thanks in advance,

Mark

Please see if this helps

http://groups.google.com/group/micro...6f06d859a21886

AFAICS involves using VBS to invoke OS command "compact" with command
line switches to uncompress a given file.


Jul 10 '07 #3
Mark: You looked at the first piece of code only... scroll down and
you'll find the uncompressing code. (I'll paste it again here)
=== paste begin

dim fso, strFile
strFile = "d:\tempp\test.txt"
set fso=createObject("Scripting.fileSystemObject")
set wshShell = createObject("Wscript.Shell")
set fl = fso.getFile(strFile)
if (fl.attributes AND 2048) then
strCompactCmd = "%comspec% /c compact /u """ & strFile &
""""
wscript.echo "Trying to uncompress...using command:" &
strCompactCmd
set objOut = wshShell.exec(strCompactCmd)
while objOut.status=0
wscript.sleep 1000
wend
strOP=objOut.StdOut.ReadAll()
if instr(1,strOP,"[OK]") = 0 then
wscript.echo "Error uncompressing file: " & strFile
'wscript.echo strOP
else
wscript.echo "File: " & strFile & " uncompressed
successfully"
end if
else
wscript.echo "File is not compressed, aborting uncompress
operation."
end if

=== paste end

Regards
Chris
On Jul 10, 8:29 pm, "Mark" <mreed1...@ntlworld.comwrote:
Hi Chris,
apologies again for not being clear in my original post. The link you
have sent worked as you stated but instead of compressing a file by setting
it's advanced properties to "Compress contents to save disc space" = TRUE, I
want to be able to extract the contents of a .zip file which this code does
not do :o(

Many thanks,

Mark

"Chris L." <diver...@uol.com.arwrote in message

news:11**********************@o61g2000hsh.googlegr oups.com...
On Jul 10, 4:03 pm, "Mark" <mreed1...@ntlworld.comwrote:
Good evening all,
using a XP pro platform and Access 2003 SP2, is it possible to
identify
a .zip file, inflate the file and then import the contents? I'm pretty
certain I could code steps 1 & 3 but over an hour of googling, I haven't
found anything which has been of any help.
Thanks in advance,
Mark
Please see if this helps
http://groups.google.com/group/micro...ng.vbscript/br...
AFAICS involves using VBS to invoke OS command "compact" with command
line switches to uncompress a given file.- Hide quoted text -

- Show quoted text -

Jul 11 '07 #4
Still plagarizing? You should give the original author credit..

John... Visio MVP

"Steve" <so***@private.emailaddresswrote in message
news:5q***************@newsread2.news.pas.earthlin k.net...
>I copied the below from somewhere in the past. Hope it helps!

Jul 14 '07 #5
"Mark" <mr*******@ntlworld.comwrote:
using a XP pro platform and Access 2003 SP2, is it possible to identify
a .zip file, inflate the file and then import the contents?
Compression DLLs, OCXs, etc
http://www.granite.ab.ca/access/compression.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jul 16 '07 #6
Absolutley fantastic. Thank you very much Tony.

This has been driving me mad for weeks now :o)

Regards,

Mark
"Tony Toews [MVP]" <tt****@telusplanet.netwrote in message
news:7k********************************@4ax.com...
"Mark" <mr*******@ntlworld.comwrote:
> using a XP pro platform and Access 2003 SP2, is it possible to
identify
a .zip file, inflate the file and then import the contents?

Compression DLLs, OCXs, etc
http://www.granite.ab.ca/access/compression.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Jul 24 '07 #7
"Mark" <mr*******@ntlworld.comwrote:
>> using a XP pro platform and Access 2003 SP2, is it possible to
identify
a .zip file, inflate the file and then import the contents?

Compression DLLs, OCXs, etc
http://www.granite.ab.ca/access/compression.htm
>Absolutley fantastic. Thank you very much Tony.

This has been driving me mad for weeks now :o)
You are quite welcome. Glad my website was of assistance.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jul 26 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chris | last post by:
Hi Where can I find info on unzipping file with VB.NET. I need to unzip a winzip file with my application Thanks
10
by: Yogi_Bear_79 | last post by:
pardon my ignorance as I am a self-taught hobbyist programmer. I am curious after reading up on SharpZipLib. Can I embed a zipped txt file in my program? Then either read from within the zip...
1
by: johnnyh | last post by:
I am currently using ASP.Net / C# to partially upload the first 100K of a CSV file to programattically extract the header information for field mapping against our database and for a test sample of...
1
by: Jean Christophe Avard | last post by:
Hi! Finally I figure out what was wrong... "objZipEntry.size = strmFile" I wasn't giving the right file length... But now, I have issue with the unzip function... I can't unzip it, the unzip function...
3
by: SDRoy | last post by:
Hello Can someone tell me how I can unzip a .zip file in C#. The zip file is already there and I just need to unzip..not zip and unzip. -- Thanks, SDRoy
4
by: DataSmash | last post by:
I need to unzip all zip file(s) in the current directory into their own subdirectories. The zip file name(s) always start with the string "usa" and end with ".zip". The code below will make the...
3
by: sdoty044 | last post by:
I am a true n00b... and I just using Python to complete some very small uneventful task, but need help with one last thing. Basically, this I what I am trying to do. make a temp directory...
5
by: =?Utf-8?B?anVsaW8=?= | last post by:
Hi, I write a program to unzip a Tar file generated on a Unix environment file using SharpZipLib, but returns a error "Header checksum is invalid" when execute the program. This error appears...
1
by: olddocks | last post by:
I want to upload a zip file and then extract/unzip it. I am accomplishing this with php exec command. I am calling unzip from php exec command within a php script and it is not extracting files. why?...
2
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.