Click here to Skip to main content
14,695,590 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi dears

I want to create a file with my own extension for e.g (.abp)
and I want to combine and merge 2 or more files to it.
something like making a zip file, but with my own extension that no others can open the file.

please help me how can I do this
and the important part is if I do this, then how can I extract those files that has been combined to one file and read or use them?

suppose that I want to make a file named (combined.cmb) and add one word document file and a spreadsheet file and one mp3 file to it.

and then how can I extract these three files back to read them?
Posted
Comments
[no name] 15-Aug-12 14:33pm
   
Simple. Zip them and rename the archive to something other than yourfiles.zip.
Sergey Alexandrovich Kryukov 15-Aug-12 14:36pm
   
Good point.
--SA
Mostafa M.A 15-Aug-12 16:01pm
   
ok it's a solution; there is a lot of code snippets in net for making a zip file but most of them was difficult to handle or understand, would you please help me for a solution to make a zip file from a directory?
[no name] 15-Aug-12 16:08pm
   
There are plenty, http://www.codeproject.com/Articles/37887/C-Zip-Files-and-or-Folders (not so sure about this one), http://www.codeproject.com/Articles/21420/ZipStorer-A-Pure-C-Class-to-Store-Files-in-Zip (I would try this one first), http://www.codeproject.com/Articles/209731/Csharp-use-Zip-archives-without-external-libraries, among others. It's impossible for me to know what would not be difficult or easy for you to understand.
Mostafa M.A 15-Aug-12 22:01pm
   
thank you, it was so useful, I see your second link and it helped me a lot
[no name] 15-Aug-12 22:28pm
   
Good. Glad that it helped.

1 solution

use this library :
http://dotnetzip.codeplex.com/[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900