473,395 Members | 1,915 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,395 software developers and data experts.

Combining files.

Hello,

is there a way to combine multiple files into 1 file with VB.NET?

Example:
Dim MyList As New ArrayList()
MyList.Add("File1.txt")
MyList.Add("File2.doc")
Pack(MyList , "AllMyFiles.dat")
....
Unpack("c:\MyDirectory", "AllMyFiles.dat" )
....

Thanks.

Nov 21 '05 #1
4 1518
Qwert,

There are more ways.

One of them, create a dataset. Serialize the objects, place those in the
items. However you have to know the techniques for that, it is so much to
place that in one sample.

I hope this helps,

Cor
Nov 21 '05 #2
"Qwert" <no**@nosp.com> schrieb:
is there a way to combine multiple files into 1 file with VB.NET?


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

You can build CAB files using the "MAKECAB.EXE" utility that is IIRC
included in Windows. For extracting CAB files, you can use Microsoft's
"EXTRACT.EXE", which is available on the Windows XP CD or as part of the
Windows XP Support Tools:

<URL:http://groups.google.de/groups?selm=u%24EaZ074EHA.1296%40TK2MSFTNGP10.phx. gbl>

Alternative you can use p/invoke on 'SetupIterateCabinet'. A VB6 sample can
be found here:

View and Extract CAB File Contents Programmatically
<URL:http://www.thescarms.com/vbasic/CabExplorer.asp>

The Zip, GZip, BZip2 and Tar Implementation For .NET
<URL:http://www.icsharpcode.net/OpenSource/SharpZipLib/>

The VB.NET Resource Kit contains zipping functionality too (note that the
Resource Kit is
not available any more, so the answer applies for the case that you already
have a copy of the Resource Kit):

The Visual Basic .NET Resource Kit
<URL:http://msdn.microsoft.com/vbasic/vbrkit/>

It contains ComponentOne Zip for .NET:

ComponentOne Zip™ for .NET
<URL:http://www.componentone.com/products.aspx?TabTypeID=1&ItemType=1&PanelIndex=14 &ItemID=53569&SubCategoryTypeID=0&TabMapID=57&TabI D=70>

Using J#'s zip functionality:

Using the Zip Classes in the J# Class Libraries to Compress Files and Data
with C#
<URL:http://msdn.microsoft.com/msdnmag/issues/03/06/zipcompression/>

..NET 2.0 will contain ZIP support too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Yes thanks, both answers were helpfull.
"Cor Ligthert" <no************@planet.nl> schreef in bericht
news:%2****************@TK2MSFTNGP14.phx.gbl...
Qwert,

There are more ways.

One of them, create a dataset. Serialize the objects, place those in the
items. However you have to know the techniques for that, it is so much to
place that in one sample.

I hope this helps,

Cor

Nov 21 '05 #4
Why not just put them in a zip file then have them unzipped. You can do this
programtically with Zlib.

"Qwert" wrote:
Hello,

is there a way to combine multiple files into 1 file with VB.NET?

Example:
Dim MyList As New ArrayList()
MyList.Add("File1.txt")
MyList.Add("File2.doc")
Pack(MyList , "AllMyFiles.dat")
....
Unpack("c:\MyDirectory", "AllMyFiles.dat" )
....

Thanks.

Nov 21 '05 #5

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

Similar topics

2
by: Chris Mullins | last post by:
I've spent a bit of time over the last year trying to implement RFC 3454 (Preparation of Internationalized Strings, aka 'StringPrep'). This RFC is also a dependency for RFC 3491...
3
by: alwayswinter | last post by:
I currently have a form where a user can enter results from a genetic test. I also have a pool of summaries that would correspond to different results that a user would enter into the form. I...
7
by: Barry | last post by:
Hi all, I've noticed a strange error on my website. When I print a capital letter P with a dot above, using & #7766; it appears correctly, but when I use P& #0775 it doesn't. The following...
1
by: Adam Clauss | last post by:
Alright, I have a need to combine 2 (or possibly more - figure if I can get two working, more won't be hard) .wav files into one .wav file. Now, it is relatively easy enough for me to read in the...
2
by: Stefan | last post by:
Hi there! I'm very new to XML and XSLT, so while working i encountered the following, probably very easy to solve, problem. i've got 2 XML-files, which look like this: LinesOfCode.xml:...
10
by: wo_shi_big_stomach | last post by:
Newbie to python writing a script to recurse a directory tree and delete the first line of a file if it contains a given string. I get the same error on a Mac running OS X 10.4.8 and FreeBSD 6.1. ...
5
by: Tristan Miller | last post by:
Greetings. Is it possible using HTML and CSS to represent a combining diacritical mark in a different style from the letter it modifies? For example, say I want to render Å‘ (Latin small letter...
0
by: Gabriel Genellina | last post by:
En Fri, 02 May 2008 17:45:57 -0300, CRAIG DALTON <CXDALTON@sentara.com> escribió: Except the spurious + in join(r+,files), and the usage of "files" denoting a single file name, the code looks...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.