Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Unzip a zip file which contains multiple subfolders using VBSCRIPT?!

Reply
 
Old 05-19-2009   #1 (permalink)
keithmcpherson44


 
 

Unzip a zip file which contains multiple subfolders using VBSCRIPT?!

Hello,

I am used to writing scripts using VBSCRIPT. I've written a couple of
scripts which unzip and zip files.

However, I've been asked to now look at some zip files that need to be
unzip which contain multiple subrfolders in the zip file.

When I look in the compressed folder temp.zip, I see c:\Thisfile
\client\date\temp.txt.

How do I traverse the subfolders in a zip file to get to Temp.txt?

Thanks for the help.

My System SpecsSystem Spec
Old 05-26-2009   #2 (permalink)
Heinz


 
 

Re: Unzip a zip file which contains multiple subfolders using VBSCRIPT?!

Hello,

maybe this can help you:

http://www.robvanderwoude.com/vbstec...#CopyHereUNZIP

Heinz

<keithmcpherson44@xxxxxx> schrieb im Newsbeitrag
news:3191c983-5128-4163-8606-74f88946ca97@xxxxxx
Quote:

> Hello,
>
> I am used to writing scripts using VBSCRIPT. I've written a couple of
> scripts which unzip and zip files.
>
> However, I've been asked to now look at some zip files that need to be
> unzip which contain multiple subrfolders in the zip file.
>
> When I look in the compressed folder temp.zip, I see c:\Thisfile
> \client\date\temp.txt.
>
> How do I traverse the subfolders in a zip file to get to Temp.txt?
>
> Thanks for the help.

My System SpecsSystem Spec
Old 05-26-2009   #3 (permalink)
Paul Randall


 
 

Re: Unzip a zip file which contains multiple subfolders using VBSCRIPT?!


<keithmcpherson44@xxxxxx> wrote in message
news:3191c983-5128-4163-8606-74f88946ca97@xxxxxx
Quote:

> Hello,
>
> I am used to writing scripts using VBSCRIPT. I've written a couple of
> scripts which unzip and zip files.
>
> However, I've been asked to now look at some zip files that need to be
> unzip which contain multiple subrfolders in the zip file.
>
> When I look in the compressed folder temp.zip, I see c:\Thisfile
> \client\date\temp.txt.
>
> How do I traverse the subfolders in a zip file to get to Temp.txt?
I have attempted to write a script to only recursively display the contents
of a zip folder, and was unsuccessful in accessing individual file/folder
items within zipped subfolders. I think your only choice is to recursively
unzip to a temporary folder the items in the tree branch leading to your
file of interest.

-Paul Randall


My System SpecsSystem Spec
Old 06-03-2009   #4 (permalink)
Paul Randall


 
 

Re: Unzip a zip file which contains multiple subfolders using VBSCRIPT?!


<keithmcpherson44@xxxxxx> wrote in message
news:3191c983-5128-4163-8606-74f88946ca97@xxxxxx
Quote:

> Hello,
>
> I am used to writing scripts using VBSCRIPT. I've written a couple of
> scripts which unzip and zip files.
>
> However, I've been asked to now look at some zip files that need to be
> unzip which contain multiple subrfolders in the zip file.
>
> When I look in the compressed folder temp.zip, I see c:\Thisfile
> \client\date\temp.txt.
>
> How do I traverse the subfolders in a zip file to get to Temp.txt?
>
> Thanks for the help.
Hi again,

I'm revisiting this issue, and I now think that there is hope to write a
script that traverses a deeply nested zip folder structure that contains a
combination of zipped and non-zipped folders. I haven't attempted to code
it, but I think it is instructive to watch how Windows drills down into this
type of structure.

Example:
1) Create a folder named 1-Deep.zip containing folder 2-Deep.zip which
contains folder 3-Deep.zip which contains folder 4-Deep.zip which contains
file dummy.txt.
2) In the folder that contains folder 1-Deep.zip, right click on 1-Deep.zip
and choose Explore.
3) Make the explore window fairly wide and set the division between right
and left pane as far to the right as possible, so that you can see a lot of
the folder tree structure on the left.
4) The left pane should have 1-Deep.zip highlighted, and the right pane
should list 2-Deep.zip.
5) Double click 2-Deep.zip on the right, and watch the magic happening in
the left pane - now a temporary folder has been created, named something
like C:\DOCUME~1\Paul\LOCALS~1\Temp\Temporary Directory 1 for
1-Deep.zip\2-Deep.zip (which is highlighted in the left pane), and the right
pane shows that 3-Deep.zip is the only content.
6) Double click 3-Deep.zip on the right and watch another temporary folder
be created, named something like C:\DOCUME~1\Paul\LOCALS~1\Temp\Temporary
Directory 1 for 2-Deep.zip\3-Deep.zip
7) Repeat for 4-Deep.zip and watch the results.

I think that scripting this process can be done by executing the proper
verbs for shell folder item objects for the various zip folder levels. It
is fairly easy to script the copying of a shell folder item to a file system
folder; I can post that code if you wish.

-Paul Randall



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Clean out old files from multiple subfolders VB Script
Unzip a zipped file General Discussion
unzip a file in windows vista Vista General
creating a new folder in multiple subfolders Vista General
UNZIP a ZIP file Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46