winrar

How to hide error messages in 7Zip command line?

为君一笑 提交于 2019-12-11 08:48:24
问题 -inul command prevents error-box from coming up in WinRar command line. Is there any equivalent command for 7Gz.exe? 回答1: 7-Zip writes all its messages to stdout , including error and warning messages. This means you can collect all the output from it by redirecting stdout it to a file. A command like the following will redirect all output (including from stderr) to Log.txt: 7za a Test.7z *.* >Log.txt 2>&1 来源: https://stackoverflow.com/questions/21118929/how-to-hide-error-messages-in-7zip

How to calculate CRC of a WinRAR file?

只愿长相守 提交于 2019-12-10 17:25:56
问题 I know CRC calculation algorithm from Wikipedia. About structure of RAR file I read here. For example, there was written: The file has the magic number of: 0x 52 61 72 21 1A 07 00 Which is a break down of the following to describe an Archive Header: 0x6152 - HEAD_CRC 0x72 - HEAD_TYPE 0x1A21 - HEAD_FLAGS 0x0007 - HEAD_SIZE If I understand correctly, the HEAD_CRC (0x6152) is CRC value of Marker Block (MARK_HEAD). Somewhere I read, that CRC of a WinRAR file is calculated with standard polynomial

How to unzip several *.zip archive files into separate folders?

浪尽此生 提交于 2019-12-10 11:10:25
问题 I searched with Google but I didn't find something for Windows. How can I extract several files into several folders? For example: a.zip , b.zip and c.zip into the folders a , b and c . I am looking for a command prompt command or a batch file solution. Thanks 回答1: With using WinRAR in GUI mode: Start WinRAR . Select all the *.zip files. Click on icon Extract To in toolbar. Enter destination folder or browse to destination folder. Check the option Extract archives to subfolders in group

How to archive each folder in a directory separately using WinRAR?

核能气质少年 提交于 2019-12-10 10:55:48
问题 I am trying to use WinRAR to compress all my different folders individually. Example of folder content before c:\projects\test c:\projects\country c:\projects\db and after running the batch file c:\backup\test.rar c:\backup\country.rar c:\backup\db.rar I am trying the following command in a batch file. But it compresses all the folders in the projects folder being into the backup archive: for /f "delims==" %%D in ('DIR C:\projects /A /B /S') do ( "C:\Program Files\WinRAR\WinRAR.EXE" m -r "c:

WinRar archive with iimg and iicon options becomes corrupted

假装没事ソ 提交于 2019-12-07 23:56:42
问题 I'm trying to create a self-extractable (SFX) rar archive, which will have both icon and image. I'm using the following command line: winrar.exe a -r0 -sfx -ibck -z"MyConfFile.conf" -iimg"MyImage.bmp" -iicon"MyIcon.ico" MyPackage.exe @"MyFileList.txt" Trouble is - the resulting .exe can't be unpacked. Instead it says "The archive is either in unknown format or damaged". If I set only icon or only image, then everything is fine. But if I set both, I'm in trouble. Strangest thing. 回答1: The code

get a list of files with winrar command line

 ̄綄美尐妖づ 提交于 2019-12-07 00:12:31
I want to get a list of files and preferably uncompressed file size via winrar command line. How do i do this? and how do i do this with a password? From the doc it looks like i use -pPASSWORD Winrar comes with Rar.exe command-line tool. You could use it in the following format: Rar.exe l -pPASSWORD archive.rar the commands l (lower L) and lb (LB) are available in rar.exe and unrar.exe (but not in Winrar.exe) the command l lists a lot of other informations beside the filename (compression-rate, date, ...) if you just need the filenames then use lb instead of l: unrar.exe lb -pPASSWORD archive

How to archive each folder in a directory separately using WinRAR?

和自甴很熟 提交于 2019-12-06 09:50:24
I am trying to use WinRAR to compress all my different folders individually. Example of folder content before c:\projects\test c:\projects\country c:\projects\db and after running the batch file c:\backup\test.rar c:\backup\country.rar c:\backup\db.rar I am trying the following command in a batch file. But it compresses all the folders in the projects folder being into the backup archive: for /f "delims==" %%D in ('DIR C:\projects /A /B /S') do ( "C:\Program Files\WinRAR\WinRAR.EXE" m -r "c:\backup\projects.rar" "%%D" ) c:\backup\projects.rar contains all the files which I want in separate

C# 调用WinRAR解压缩文件

Deadly 提交于 2019-12-05 06:18:01
在项目中有可能会用到解压缩,代码如下 public class CompressHelper { /// <summary> /// 压缩 /// </summary> /// <param name="sourceFilePath">源文件路径</param> /// <param name="sourceName">源文件名称</param> /// <param name="compressName">压缩文件名</param> /// <param name="compressPath">压缩文件路径</param> /// <returns></returns> public static bool CompressFile(string sourceFilePath, string sourceName, string compressName, string compressPath) { string winrarPath = string.Empty; if (!ExistsCompressApp(out winrarPath)) { return false; } if (string.IsNullOrEmpty(compressPath)) { compressPath = sourceFilePath; } string type =

How does WinRAR perform a compression ratio check?

爱⌒轻易说出口 提交于 2019-12-05 01:53:22
问题 E.g. how can it tell that a 4GB text file can be compressed to, say, 200MB? Obviously, it doesn't read all of the contents in 2 or so seconds... so what kind of predictive algorithm(s) does it use? 回答1: They use variant of Prediction by partial matching (PPM) called PPMd. Look at wiki 回答2: It takes usually -log(x) + log(2) bits to compress x bits. However this is a highly theoretical value and it depends heavenly on the data you want to compress. For your data you have to record each

extract ISO with winrar automatically with c# or batch

喜夏-厌秋 提交于 2019-12-04 04:22:22
问题 I'm trying to extract an ISO to a folder with the same name without .iso on the end. I'm having a problem with winrar as it will not start the extract when I start up with the seach starting in the folder with the ISO. UPDATED with answer code private void ExtractISO(string toExtract, string folderName) { // reads the ISO CDReader Reader = new CDReader(File.Open(toExtract, FileMode.Open), true); // passes the root directory the folder name and the folder to extract ExtractDirectory(Reader