Connecting Tech Pros Worldwide Help | Site Map

Unzip a file

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 10th, 2007, 07:05 PM
Mark
Guest
 
Posts: n/a
Default 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



  #2  
Old July 10th, 2007, 08:45 PM
Chris L.
Guest
 
Posts: n/a
Default 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.


  #3  
Old July 10th, 2007, 11:35 PM
Mark
Guest
 
Posts: n/a
Default 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.
>
>

  #4  
Old July 11th, 2007, 12:35 PM
Chris L.
Guest
 
Posts: n/a
Default 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:
Quote:
Thanks in advance,
>
Quote:
Quote:
Mark
>
Quote:
Please see if this helps
>>
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 -

  #5  
Old July 14th, 2007, 10:25 PM
John Marshall, MVP
Guest
 
Posts: n/a
Default 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!
>

  #6  
Old July 16th, 2007, 10:05 PM
Tony Toews [MVP]
Guest
 
Posts: n/a
Default 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/
  #7  
Old July 24th, 2007, 07:25 PM
Mark
Guest
 
Posts: n/a
Default 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...
Quote:
"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/

  #8  
Old July 26th, 2007, 11:15 PM
Tony Toews [MVP]
Guest
 
Posts: n/a
Default Re: Unzip a file

"Mark" <mreed1975@ntlworld.comwrote:
Quote:
Quote:
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
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/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

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 220,840 network members.