You can find related command via the link I provided in my last reply. Directory.GetFiles( RarFiles( files) If you would like to add a whole directory to a package, you need to change to another command. The code can be like below: List files = new List() files.Add( files.Add( files.Add( RarFiles( files) If you would like to add all the files in a directory, the code can be like bellow: List files = new List() files.AddRange(System.IO. The command I show is to package some files. On your machine, it may be different, so you need to replace this string to the winrar program path on your machine.Ģ. My operation system is 64-bit, so it adds “x86” because the winrar program is 32-bit. This is the path of the winrar program on my machine. This can be beneficial to other community members reading the thread.ġ. Please mark the replies as answers if they help and unmark if they don't. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet. It can backup your data and reduce the size of email attachments, open and unpack RAR, ZIP and other files downloaded from Internet, create new archives in RAR and ZIP file format. ![]() Microsoft does not control these sites and has not tested any software or information found on these sites therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Microsoft is providing this information as a convenience to you. The RAR file is a very popular file compression format, if you need a simple tool to extract RAR files, and do not need compress function, then this is the software you need. This response contains a reference to a third party World Wide Web site. Free Unrar is a free, fast RAR file decompression tool for Windows, it is very simple, convenient and easy to use. You can get more support about winrar from. Private void RarFiles(string rarPackagePath, List files)įiles = string.Format("\"\"", RAR_PATH), cmdArgs) Private const string RAR_PATH = Files (x86)\WinRAR\WinRAR.exe" This is a code snippet shows how to call winrar to package or extract files: //Rar path Although WinRAR is shareware, it can be used on a trial basis for 40 days. Both are located in the C:\Program Files\WinRAR folder in the installable version. We can use Process.Start to execute a command in C#. It includes two command-line tools, rar.exe and unrar.exe, where rar.exe compresses and unrar.exe uncompresses files. Windows: WinRAR 6.11 Chinese Traditional 64 bit: 3652 KB: Windows: WinRAR 6.11 Croatian 64 bit: 3446 KB: Windows: WinRAR 6.11 Czech 64 bit: 3668 KB: Windows: WinRAR 6.11 Danish 64 bit: 3439 KB: Windows: WinRAR 6.11 Dutch 64 bit: 3729 KB: Windows: WinRAR 6.11 English 64 bit: 3397 KB: Windows: WinRAR 6.11 Euskera 64 bit: 3498 KB: Windows: WinRAR 6. We can use command to call a rar program to achieve your goal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |