7zip

Extracting a 7-Zip file “silently” - command line option

喜你入骨 提交于 2019-12-03 04:21:30
I want to extract a 7-Zip archive in a Python script. It works fine except that it spits out the extraction details (which is huge in my case). Is there a way to avoid this verbose information while extracting? I did not find any "silent" command line option to 7z.exe . My command is 7z.exe -o some_dir x some_archive.7z One possibility would be to spawn the child process with popen , so its output will come back to the parent to be processed/displayed (if desired) or else completely ignored (create your popen object with stdout=PIPE and stderr=PIPE to be able to retrieve the output from the

7-Zip command to create and extract a password-protected ZIP file on Windows?

不羁岁月 提交于 2019-12-03 01:36:00
问题 On Mac/Linux to zip/unzip password protected zip files, I use: Zip: zip -P password -r encrypted.zip folderIWantToZip Unzip: unzip -P password encrypted.zip What are the equivalent command on Windows on the command line (assuming that 7zip has been installed)? I have been doing research and found that it is not possible to password encrypt using the Java zip4j library. Also Windows does not have a zip command prompt like Mac/Linux 回答1: From http://www.dotnetperls.com: 7z a secure.7z *

Compressing only files using 7z without preserving the path

家住魔仙堡 提交于 2019-12-02 23:27:44
I am using 7z command line executable to zip files, but I see that while adding to an archive the path of the files is preserved in the archive. So if I do 7z a -tzip myzip.zip dir1\dir2\* the archive myzip.zip will contain the path dir1\dir2. I do not want this, rather I want only the files to be added to the zip file without the paths being preserved. I searched quite a bit but do not seem to find any way of doing this, maybe I am missing something obvious? Thanks Pradeeban Kathiravelu Give the full path. That should work. Not the relative path from the current location. For example, I give

programmatically extract tar.gz in a single step (on windows with 7zip)

偶尔善良 提交于 2019-12-02 20:10:43
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: stackoverflow question for tar-gz . My question is almost the same, but not the same, because I would like to do this on windows using 7zip 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 that does this already? 7z e example.tar.gz && 7z x example.tar Use && to combine two commands in one

Converting .bat to .exe with no additional external software (Create SFX)

烈酒焚心 提交于 2019-12-02 19:48:10
Following the same steps as this guide . I am trying to convert from bat to exe without installing any new software such as Bat to Exe Converter . The reason I am using this method is because all machines in my workplace already have 7zip installed and can use it, however I am not allowed to make the script work using external software not present on the main server to be compatible on any machine in the company. I have the following TEST.bat : ECHO This is a Test bat to exe pause and the config.txt : ;!@Install@!UTF-8! RunProgram="TEST.bat" ;!@InstallEnd@! then I call the following command

7zip unzipping fails when destination path is given by parameter [Powershell]

放肆的年华 提交于 2019-12-02 15:36:14
问题 I am automating installation through a Powershell script and am having some issues with unzipping to a path given by a parameter rather than being hardcoded. The unzipping seems to go like it is supposed to and takes a while to process but in the end no files are delivered to the destination folder. This does not happen when I explicitly state the destination path. For example, this code works: & $7zipexe x $zipFile -p$zipFilePassword -oC:\Test -y This, however does not: & $7zipexe x $zipFile

Using FOR or FORFILES batch command to individually archive specific files

人走茶凉 提交于 2019-12-02 11:53:01
I have a set of .iso files in different directories and sub-directories: <folder1> app1.iso app2.iso app3.iso <subfolder1> app1a.iso app2a.iso <subfolder2> app2b.iso app3b.iso <folder2> app4.iso app5.iso <subfolder5> app20.iso Using a batch file and having 7-zip pre-installed (with PATH environment variable configured), I want to be able to archive each .iso to it's own individual .7z archive file. I don't want to archive all .iso's in a current folder into one archive. I attempted to create my own 7-zip command in conjunction with the FORFILES: FORFILES /P . /M *.iso /S /C "cmd /c 7z a -t7z

Java: `A` Archive attribute missing while creating zip programmatically

谁说我不能喝 提交于 2019-12-02 06:42:14
问题 We are dealing with the decompression libraries/utility that uses attribute to check for the presence of directories/files within the zip. Problem is that we are not able to set archive bit for a zip while creation. When we create zip programmatically, it wash out previous attributes as well. We will try to set archive bit with below mentioned steps but not getting desired result so far: 1. Parse each zip entry and getExtra byte[]. 2. Use Int value=32 and perform bitwise 'OR' operation. 3.

7zs.sfx unsupported method

瘦欲@ 提交于 2019-12-01 08:20:31
问题 I have setup project that I need to sfx him . first I zip the .msi and .exe files : %path7zip% a "%~dp0% %setup.7z" "%~dp0% %Output\Setup\*" that work fine . then I sfx the 7z file : copy /b %path7zs% + "%~dp0% %config.txt" + "%~dp0% %Setup.7z" "%~dp0% % Output\Setup\MySetup.exe" my config file is : ;!@Install@!UTF-8! Title="my title" Progress="no" GUIFlags="" OverwriteMode="0" InstallPath="%TEMP%" ExtractPathText="Select extraction path" ExtractPathTitle="my title" ExtractTitle="Extracting"

LZMA Or 7zip in Delphi

纵然是瞬间 提交于 2019-12-01 06:30:52
Is there any Library in Delphi to handle LZMA (or 7zip)files including creating self extracting EXEs There are some sources code at 7zip.org in (c++ java c#) but i want them in delphi BUT i want something which is stand alone (No DLLs) there are two solutions: 1) use the into native pascal translated sdk: Pascal LZMA SDK Source Download 2) you can compile the c version of the sdk into obj files and link them to your delphi project. this one requires a translation of the header files to delphi and it requires lots of c knowledge. LZMA SDK Inno setup have delphi source code to encode and decode