Unzip a file 
July 10th, 2007, 08:05 PM
| | | |
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 | 
July 10th, 2007, 09:45 PM
| | | | re: Unzip a file
On Jul 10, 4:03 pm, "Mark" <mreed1...@ntlworld.comwrote: Quote:
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. | 
July 11th, 2007, 12:35 AM
| | | | re: Unzip a file
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." <diversos@uol.com.arwrote in message
news:1184100107.768038.319450@o61g2000hsh.googlegr oups.com... Quote:
On Jul 10, 4:03 pm, "Mark" <mreed1...@ntlworld.comwrote: Quote:
>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.
>
>
| | 
July 11th, 2007, 01:35 PM
| | | | re: Unzip a file
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: Quote:
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:1184100107.768038.319450@o61g2000hsh.googlegr oups.com...
>
>
> Quote:
On Jul 10, 4:03 pm, "Mark" <mreed1...@ntlworld.comwrote: Quote:
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.
| | >>>>> Quote:
AFAICS involves using VBS to invoke OS command "compact" with command
line switches to uncompress a given file.- Hide quoted text -
| >
- Show quoted text -
| | 
July 14th, 2007, 11:25 PM
| | | | re: Unzip a file
Still plagarizing? You should give the original author credit..
John... Visio MVP
"Steve" <sorry@private.emailaddresswrote in message
news:5qRki.5762$rR.335@newsread2.news.pas.earthlin k.net... Quote:
>I copied the below from somewhere in the past. Hope it helps!
>
| | 
July 16th, 2007, 11:05 PM
| | | | re: Unzip a file
"Mark" <mreed1975@ntlworld.comwrote: Quote:
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/ | 
July 24th, 2007, 08:25 PM
| | | | re: Unzip a file
Absolutley fantastic. Thank you very much Tony.
This has been driving me mad for weeks now :o)
Regards,
Mark
"Tony Toews [MVP]" <ttoews@telusplanet.netwrote in message
news:7kqn93dig8q441jk9ls8aver8s4tfi1035@4ax.com... | 
July 27th, 2007, 12:15 AM
| | | | re: Unzip a file
"Mark" <mreed1975@ntlworld.comwrote: Quote:
>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/ |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|