Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extract all files from compressed folder in xp 1

Status
Not open for further replies.

SimonSellick

Programmer
Nov 3, 2003
305
GB
Hi,

I hope this is a suitable forum to post this one.

Does the XP FileSystemObject (or any other object) support extracting the files from a compressed folder (which appears just to be a zip file) into uncompressed form? I can't see an obvious method in the object browser and I can't find a reference to doing this in msdn. I want to do this action in VB prior to processing the uncompressed files, so finding a suitable method would be preferable to having to shell out to some utility to do the extract.

Any help appreciated.

Simon.
 
One option (and the only one I know of) would be to use the winzip command line utility to extract to a temporary folder with a static name/location.

Then use FSO to loop through the folder, and delete the folder when finished.

Hope this helps,

Alex

A wise man once said
"The only thing normal about database guys is their tables".
 
If you really want to do it using facilities built into XP try there is a class there that I have tried and it works. However its not any use unless running on XP; I personally use the free (and redistributable) zip and unzip exe files available from infozip and shell out to them. The infozip dll referenced by Swi is another alternative, I prefer shelling out to the exes because they have more (command line) options than the dll.

HTH Hugh,
 
Alex, Swi, Hugh: Thanks very much for the links and suggestions. The files are very large so I've decided to go with the unzip.exe option and shell out to it - star for Hugh!

The info-zip DLL looks very interesting; I'll play with that as well when I get a chance.

Thanks again everyone.

Simon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top