Connecting Tech Pros Worldwide Help | Site Map

Unzip a file

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

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 11th, 2007, 12:35 AM
Mark
Guest
 
Posts: n/a

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, 01:35 PM
Chris L.
Guest
 
Posts: n/a

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, 11:25 PM
John Marshall, MVP
Guest
 
Posts: n/a

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, 11:05 PM
Tony Toews [MVP]
Guest
 
Posts: n/a

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, 08:25 PM
Mark
Guest
 
Posts: n/a

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 27th, 2007, 12:15 AM
Tony Toews [MVP]
Guest
 
Posts: n/a

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/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNZIP File Chris answers 7 November 22nd, 2005 09:46 AM
unzip file automated at client(IE) by c sharp happysoft answers 1 November 15th, 2005 07:03 PM
Code to Unzip file from Outlook message Jim answers 3 November 13th, 2005 01:16 PM
ZIP & UNZIP File jeff answers 1 July 22nd, 2005 12:45 AM
UNZIP File Chris answers 7 July 21st, 2005 02:03 PM