- #INNO SCRIPT STUDIO PUT FILE ON DESKTOP HOW TO#
- #INNO SCRIPT STUDIO PUT FILE ON DESKTOP ZIP FILE#
- #INNO SCRIPT STUDIO PUT FILE ON DESKTOP ARCHIVE#
ZipArchive zip = ZipFile.Open(saveFileDialog1.FileName, ZipArchiveMode.Create) ZipFile.CreateFromDirectory(textBox1.Text, saveFileDialog1.FileName) Private void button3_Click(object sender, EventArgs e)ĭialogResult result=saveFileDialog1.ShowDialog() TextBox1.Text = folderBrowserDialog1.SelectedPath Private void button2_Click(object sender, EventArgs e)ĭialogResult result = folderBrowserDialog1.ShowDialog() String files = openFileDialog1.FileNames private void button1_Click(object sender, EventArgs e)ĭialogResult result = openFileDialog1.ShowDialog()
The following code shows the click event handler of File, Folder and Create buttons that do this job for you.
#INNO SCRIPT STUDIO PUT FILE ON DESKTOP ARCHIVE#
You can create Zip files in two ways – you can select one or more files and then create a Zip archive from those files or you can select a folder so as to Zip all the files it containes.
#INNO SCRIPT STUDIO PUT FILE ON DESKTOP ZIP FILE#
The extract button allows you to select an existing Zip file and then extract its contents to a specific folder. Once selected the files that make the Zip archive are shown in the ListBox. Clicking on the Open button allows you to select an existing Zip file. Doing so will ask for a destination Zip file name and then the Zip file will be created. Once the file(s) or a folder is selected you will click on the Create button. In order to create a new Zip file you can either select one or more files or select an entire folder. The form shown above consists of three sections – Create, Open and Extract.
#INNO SCRIPT STUDIO PUT FILE ON DESKTOP HOW TO#
In order to understand how to use ZipFile, ZipArchive and ZipArchiveEntry classes you will develop a Windows Forms application as shown below: A ZipArchive typically consists of one or more ZipArchiveEntry instances. The ZipArchiveEntry class represents a single entry from a ZipArchive. The ZipArchive class represents a bundle of files that are compressed using Zip file format. The ZipFile class provides static methods for creating, opening and extracting zip files.
Some of the new classes of interest are as follows: In order to use these classes you must refer the following two assemblies:Īdditionally, you will also need to import System.IO.Compression namespace in your C# code files. NET framework 4.5 System.IO.Compression, namespaces get some new classes that allow you to work with Zip files programmatically. This article examines some of these classes. If you find yourself struggling or want to increase your knowledge of C#, consider visiting the TechRepublic Academy! Using these classes you can create new Zip files, open and modify existing Zip files and extract the contents of Zip files via code. NET framework 4.5 introduces some new classes in System.IO.Compression namespace that allows you to do just that. At times you may want to deal with Zip files programmatically. Normally people use some third-party utility to create, open and extract Zip files. Most of us deal with Zip files on a daily basis.