473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Listing content of .cab files

Hello all,

We have a vendor who sends us hundreds of cab files each day. Each cab file
contains exactly one *randomly* named xml file which I want to extract, save
elsewhere under a different name, and parse. These tasks I can easily
accomplish *if* I know the name the xml file (not exactly correct - I can
extract the file to a directory of my choosing, but since I don't know the
name of the file, I have no way of moving, renaming, or parsing it according
to my needs (=my boss's wants). In other words, I would like to obtain a
string or an array containing the name(s) of the file(s) in the cab.

In VB6, I found a way (that can in no way be attributed to me) to do this
through a couple of API functions and callbacks. However, I was unsuccessful
to accomplish this in VB.NET. I'm still fairly new to .NET but it seems that
there should be some way to do this without too much pain.

Any help would be most appreciated.

Sincerely,

Roy Gunnarsson
Nov 20 '05 #1
2 1373
Hi Roy,

The Api functions are still available through VB./NET but need to be
declared correctly.

If you wish to peek into the cabs yourself, the file format and example
code is available by typing CAB into the search box at
http://www.wotsit.org/search.asp

It's in C, which might dissuade you, but there are some comments which
would give you an idea.

Regards,
Fergus
Nov 20 '05 #2
* "Roy Gunnarsson" <rg*******************@excelsior.edu> scripsit:
We have a vendor who sends us hundreds of cab files each day. Each cab file
contains exactly one *randomly* named xml file which I want to extract, save
elsewhere under a different name, and parse. These tasks I can easily
accomplish *if* I know the name the xml file (not exactly correct - I can
extract the file to a directory of my choosing, but since I don't know the
name of the file, I have no way of moving, renaming, or parsing it according
to my needs (=my boss's wants). In other words, I would like to obtain a
string or an array containing the name(s) of the file(s) in the cab.


No VB.NET solution, but maybe it points you in the right direction:

Q310618 Microsoft Cabinet Software Development Kit
<http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q310618>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Chris | last post by:
Hi, Not sure if this is the right forum, but hopefully someone can help me. I am creating something for our intranet and i want to list the files and folders of a directory, i found some code...
4
by: brett | last post by:
On my website I have a directory filled with possible files that a user can select to download. Rather than going to the directory itself to download, I'd like the user to be able to select a...
19
by: SU News Server | last post by:
I've struggled with this for quite a while and I'm am just not sure what is going on. I have the following code import os def buildList( directory='/Users/mkonrad' ) dirs = listing =...
3
by: David Jacques | last post by:
I am trying to get a list of all files of a certain extension type on disk to do some processing in a loop. The code needs to be portable to UNIX, so I need to use plain c functionality. Does...
8
by: gil | last post by:
Is it possible to prevent a browser from listing the entire contents of a folder? The site, is hosted on my ISP with the following layout- site/ "user name from ISP" pagefile (dir)...
6
by: Pete Kane | last post by:
Hello all, how do I get a directory listing from a web server ?, I'm playing around with reflection and "Click once" deployment and would like to loop through a directory listing and use...
3
by: dougawells | last post by:
Hi - I'm hoping for help with the auto-generation of a hyperlinked listing of all files in a directory. The server I use does not auto-generate this. So, when someone comes to this directory and...
7
by: epikto | last post by:
I have a mapped share that I am trying to get a listing of all the files that it contains. I use the following code to access the contents String files = Directory.GetFiles(path); I can then...
1
by: TahoeKid | last post by:
I need to modify and assemble the assembler listing files generated from the VS 2005 IDE. A test generated listing file did not assmeble 'as is'. Has anyone tried this? It seems to me the...
5
by: jain236 | last post by:
HI every body, i am always getting the following error while parsing a directory . i am reading a directory by doing ls and trying to find out the name,type,size, mtime and mode of files from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.