Board index » Visual Studio » Combining files.
|
angani
|
|
angani
|
Combining files.
Visual Studio96
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. - |
| Cor
Registered User |
Sun Mar 20 05:39:08 CST 2005
Re:Combining files.
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 - |
| Herfried
Registered User |
Sun Mar 20 06:18:02 CST 2005
Re:Combining files.
"Qwert" <nosp@nosp.com>schrieb:
Quoteis there a way to combine multiple files into 1 file with VB.NET? <URL:http://support.microsoft.com/?scid=kb;EN-US;310618" rel="nofollow" target="_blank">support.microsoft.com/> 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" rel="nofollow" target="_blank">groups.google.de/groups> Alternative you can use p/invoke on 'SetupIterateCabinet'. A VB6 sample can be found here: View and Extract CAB File Contents Programmatically <URL:www.thescarms.com/vbasic/CabExplorer.asp>">www.thescarms.com/vbasic/CabExplorer.asp> The Zip, GZip, BZip2 and Tar Implementation For .NET <URL:www.icsharpcode.net/OpenSource/SharpZipLib/>">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:msdn.microsoft.com/vbasic/vbrkit/>">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&TabID=70" rel="nofollow" target="_blank">www.componentone.com/products.aspx> Using J#'s zip functionality: Using the Zip Classes in the J# Class Libraries to Compress Files and Data with C# <URL:msdn.microsoft.com/msdnmag/issues/03/06/zipcompression/>">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:dotnet.mvps.org/>">dotnet.mvps.org/> V B <URL:classicvb.org/petition/>">classicvb.org/petition/> - |
| Qwert
Registered User |
Sun Mar 20 09:26:17 CST 2005
Re:Combining files.
Yes thanks, both answers were helpfull.
"Cor Ligthert" <notmyfirstname@planet.nl>schreef in bericht QuoteQwert, - |
| Dennis
Registered User |
Sun Mar 20 13:15:01 CST 2005
Re:Combining files.
Why not just put them in a zip file then have them unzipped. You can do this
programtically with Zlib. "Qwert" wrote: QuoteHello, |
