7zip

Batch file to compress subdirectories

China☆狼群 提交于 2019-12-21 05:06:09
问题 I am trying to write a batch script that will run automatically compressing subdirectories using winrar or 7-zip: Example: My Pictures Pics1 (Pics1.zip) File1.jpg File2.jpg File3.jpg Pics2 (Pics2.zip) File4.jpg File5.jpg Pics3 (Pics3.zip) File6.jpg File7.jpg ... How do i write script. 回答1: (1) Using WinRAR: WinRAR includes two command-line tools, rar.exe and unrar.exe , where rar.exe compresses and unrar.exe uncompresses files. Both are located in the C:\Program Files\WinRAR folder in the

random seek in 7z single file archive

我们两清 提交于 2019-12-21 03:16:17
问题 Is it possible to do random access (a lot of seeks) to very huge file, compressed by 7zip? The original file is very huge (999gb xml) and I can't store it in unpacked format (i have no so much free space). So, if 7z format allows accessing to middle block without uncompressing all blocks before selected one, I can built an index of block beginning and corresponding original file offsets. Header of my 7z archive is 37 7A BC AF 27 1C 00 02 28 99 F1 9D 4A 46 D7 EA // 7z archive version 2;crc; n

Programmatically extract tar.gz in a single step (on Windows with 7-Zip)

霸气de小男生 提交于 2019-12-20 09:27:48
问题 Problem: I would like to be able to extract tar.gz files in a single step. This makes my question almost identical to this one: Stack Overflow question for tar-gz. My question is almost the same, but not the same, because I would like to do this on windows using 7-Zip command-line (or something similar) inside a bat file or Ruby/Perl/Python script. Question: This seemingly simple task is proving to be more involved than the first appearance would make it out to be. Does anyone have a script

How to unzip a 7zip archive in Android?

笑着哭i 提交于 2019-12-19 07:23:13
问题 I have a 7zip archive which contains some hundred files separated into different directories. The target is to download it from a FTP server and then extract it on the phone. My problem is that the 7zip SDK doesn't contain a lot. I am looking for examples, tutorials and snippets regarding the decompression of 7z files. (Decompression via Intent is only a secondary option) 回答1: Go here: LZMA SDK just provides the encoder and decoder for encoding/decoding the raw data, but 7z archive is a

Example of how to use PyLZMA

不打扰是莪最后的温柔 提交于 2019-12-17 19:35:30
问题 I want to use PyLZMA to extract a file from an archive (e.g. test.7z) and extract it to the same directory. I'm a newbie to Python and have no idea how to start. I've done some googling and found some examples and docs, but I don't understand how they work. Could someone please post the basic code for what I want to do so that I can start to work and understand? 回答1: Here is a Python class to handle the basic functionality. I have used it for my own work: import py7zlib class SevenZFile

Using 7-Zip from Delphi?

我的未来我决定 提交于 2019-12-17 07:19:52
问题 I would like to use the 7-Zip DLLs from Delphi but have not been able to find decent documentation or examples. Does anyone know how to use the 7-Zip DLLs from Delphi? 回答1: As of release 1.102 the JEDI Code Library has support for 7-Zip built into the JclCompression unit. Haven't used it myself yet, though. 回答2: Expanding on Oliver Giesen's answer, as with a lot of the JEDI Code Library, I couldn't find any decent documentation, but this works for me: uses JclCompression; procedure

Encrypt folder or zip file using python

孤街醉人 提交于 2019-12-13 23:49:19
问题 So I am trying to encrypt a directory using python and I'm not sure what the best way to do that is. I am easily able to turn the folder into a zip file, but from there I have tried looking up how to encrypt it with AES, but couldn't get that to work and I have also tried encrypting using 7zip to archive the folder, but also couldn't get that to work, so if anybody has another solution to encrypt a directory or could point me in the right direction on how to use one of the previous methods

Decompress Stream to String using SevenZipSharp

时间秒杀一切 提交于 2019-12-13 18:17:41
问题 I'd like to compress a string using SevenZipSharp and have cobbled together a C# console application (I'm new to C#) using the following code, (bits and pieces of which came from similar questions here on SO). The compress part seems to work (albeit I'm passing in a file instead of a string), output of the compressed string to the console looks like gibberish but I'm stuck on the decompress... I'm trying to do the same thing as here (I think) : https://stackoverflow.com/a/4305399/3451115

SETLOCAL ENABLEDELAYEDEXPANSION , Interrupt SETLOCAL ENABLEDELAYEDEXPANSION, SETLOCAL ENABLEDELAYEDEXPANSION

本秂侑毒 提交于 2019-12-13 09:52:35
问题 NOTE: THIS IS NOT A DUPLICATE!! OF "Temporarily interrupt SETLOCAL" i want to be able to SETLOCAL ENABLEDELAYEDEXPANSION then do something, then ENDLOCAL ENABLEDELAYEDEXPANSION do something else (7z command) then SETLOCAL ENABLEDELAYEDEXPANSION once again in a .bat! because 7z.exe does not allow SETLOCAL ENABLEDELAYEDEXPANSION . see? code: SETLOCAL ENABLEDELAYEDEXPANSION Echo hi! 7z e -o"C:\test" -i!*.jar "C:\*.zip" output: hi! Error: incorrect command line when i change my code to: Echo hi!

Command to unzip a specific folder using 7zip

こ雲淡風輕ζ 提交于 2019-12-13 05:03:20
问题 I am working with windows to be more specific, I am invoking the cmd Command from java program using process and getRuntime().exec() . I tried options like -r but its not working. I tried the code line Process proc = prog.exec(System.getenv("ProgramFiles").concat("\\7-Zip\\7z x " + "\""+inputZIPFile+"\""+ " -o"+outputFolder+"SpecificFolder\\* -r")); Thanks in advance 回答1: Start by using ProcessBuilder instead. It handles parameters with spaces better and allows you do things like redirect the