Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I want to convert a folder to a .zip file

for and example, I have a folder -- > C:\Users\Name\Desktop\New Folder , and I want it to convert it into a .zip file using a button so it will be C:\Users\Name\Desktop\New Folder.zip

I need a code, thanks :)
Posted
Comments
[no name] 24-Dec-15 10:27am    
You should first Google about the issue and try it by yourself. It is not that a big Thing....
OriginalGriff 24-Dec-15 10:38am    
And?
What have you tried?
Where are you stuck?
What help do you need?
Tareq Jami 24-Dec-15 10:53am    
I found two websites, but codes aren't working :(
1. site https://msdn.microsoft.com/en-us/library/system.io.compression.zipfile(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
2. site http://www.codeproject.com/Articles/381661/Creating-Zip-Files-Easily-in-NET

Need help
OriginalGriff 24-Dec-15 11:03am    
So what *exactly* did you do?
The MSDN examples do normally work...
Tareq Jami 24-Dec-15 11:10am    
I dont have .NET Framework 4.5 , so its not working for me, I have 4.0, but there should be a solution for that, I hope

"I dont have .NET Framework 4.5 , so its not working for me, I have 4.0, but there should be a solution for that, I hope"

A very quick google found this article: C# Zip Files and/or Folders[^]
 
Share this answer
 
Comments
Tareq Jami 24-Dec-15 12:08pm    
Thank you very much, but didnt you notice that I am using VB :) not C#
OriginalGriff 24-Dec-15 12:46pm    
Well, obviously I feel sorry for you, but... :laugh:
The code will be almost the same, just without the semicolons!
If you can't cope yourself, then try this:
http://converter.telerik.com/
If does a pretty good job of conversion.
Tareq Jami 24-Dec-15 12:49pm    
Thank you very much :)

okay, I'm noob >.> :p
OriginalGriff 24-Dec-15 13:58pm    
:laugh:
We all had to start somewhere!
Tareq Jami 24-Dec-15 14:38pm    
:p
I really would like to stay in contact with someone like you <3
I need always help, if you would like to help :) please tell me, if you can't np :)

Thanks anyways
Please see my past answer: Make Zip File during download[^].

—SA
 
Share this answer
 

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