7zip

Using FOR or FORFILES batch command to individually archive specific files

我与影子孤独终老i 提交于 2020-01-22 02:19:07
问题 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

Cannot extract file from ZIP archive created on Android (device/OS specific)

こ雲淡風輕ζ 提交于 2020-01-21 05:30:11
问题 I am creating an archive on Android using the code like this: OutputStream os = new FileOutputStream(zipFile); ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(os)); try { zos.setLevel(8); byte[] buffer = new byte[32768]; for (VFile src : toPack) { ZipEntry entry = new ZipEntry(src.name); zos.putNextEntry(entry); src.pushToStream(zos, buffer); src.close(); zos.closeEntry(); } } finally { zos.close(); } I found that there's only one compression method available - DEFLATED

Applying code signing for 7zip SFX (self extracting exe)

假如想象 提交于 2020-01-16 04:55:12
问题 I have code signing applied to the windows exe. And then we create an SFX (self extracting exe) with that windows exe and a json data file using the following commands. "C:\Program Files\7-Zip\7z.exe" a -t7z abc.7z "C:/xampp/htdocs/path/test.dat" "C:\Program Files\7-Zip\7z.exe" a -t7z abc.7z "C:/xampp/htdocs/path/test.exe" But when we try to download this sfx exe, we are getting warning from the browser and also showing confirmation to proceed with the installation when trying to install

How to extract 7z zip file in Python 2.7.3 version

笑着哭i 提交于 2020-01-13 11:34:07
问题 How to extract 7z zip file in python .Please some one let me know is there any library for that. I have install libarchive library in python 2.7.3 version . But i am not able to use that library. 回答1: You can use PyLZMA and py7zlib libraries to extract 7z file or try executing shell scripts to extract zip file using python subprocess module. 回答2: I use command like C:\Program Files\7-Zip\7z.exe x <filename> in my C++ project. You can run it in Python like so: import subprocess subprocess.call

unzip file using 7z in powershell

喜夏-厌秋 提交于 2020-01-11 09:47:10
问题 What is the command to unzip a file using 7z in powershell? set-alias sz "$env:ProgramFiles\7-Zip\7z.exe" sz x $zipfilePath $destinationUnzipPath -aoa -r; The command works fine but it says no files to process, everything is Ok rather than unzipping the file? 回答1: This finally worked for me sz x -o$destinationUnzipPath $zipfilePath -r ; 回答2: Aliases are not meant for that, they are meant to proxy other commands, not commands + parameters. To achieve what you want you would need to use a

Compressing & Decompressing 7z file in java

Deadly 提交于 2020-01-10 17:30:49
问题 I want to compress a file into zip, rar and 7z format using java code. Also I want to decompress these files at a specified location. Can anyone please tell me how to compress and decompress files using 7-zip in java? 回答1: I have used : sevenzipjbinding.jar sevenzipjbinding-Allplatforms.jar I am now able to decompress files using these jars. Try this link for decompression: http://sourceforge.net/projects/sevenzipjbind/forums/forum/757964/topic/3844899 回答2: SevenZipBinding is great for

Count files and folders in a zip file using PowerShell

淺唱寂寞╮ 提交于 2020-01-06 04:45:09
问题 How do you count the files and folders in a zip file? I am running a verification of backups and need to compare the folder structure of the zip file against the folder structure of the windows folder is was made from. The final goal is to have a boolean value of if the source count is equal to the zip content count. This is as far as I have, so far: [Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') |out-null $ZipContents=[IO.Compression.ZipFile]::OpenRead(

Android: 7zip a folder using Apache Commons Compress

孤人 提交于 2020-01-06 02:46:07
问题 I have included the following in my .gradle : compile 'org.apache.commons:commons-compress:1.8' I want to 7zip a folder . I have tried SevenZOutputFile sevenZOutput = new SevenZOutputFile(file); SevenZArchiveEntry entry = sevenZOutput.createArchiveEntry(fileToArchive, name); sevenZOutput.putArchiveEntry(entry); sevenZOutput.write(contentOfEntry); //this is what I don't understand!! sevenZOutput.closeArchiveEntry(); I require some help and assistance in accomplishing the above task. Thanks.

Listing the contents of a ZIP file

安稳与你 提交于 2020-01-04 03:02:12
问题 Following an example of tech-recipes I have managed to list the contents of a ZIP file (using 7-Zip: FOR /F "tokens=* delims=" %%A in ('dir /b /s *.zip') do (7z.exe l -r "%%A" >> listing.txt) However, this just dumps out the entire directory structure of the ZIP file into a text file (called listing.txt). I only want to list the directory names of the highest level directories e.g. Example.Zip 7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 Listing archive: C:\Users\Test\Desktop

How to create a compressed SFX file using SevenZipSharp?

只愿长相守 提交于 2020-01-04 01:55:46
问题 I will understand how to create a SFX using SevenZipSharp library. First of all I need to say I can't find any property to set the compression level, and all of that. And when I try to make an SFX of a file, I get this error: "Object reference not set to an instance of an object." If I try to make an SFX of a folder, I get this error: "Access to the path 'C:\test' is denied." (But is not True, I'm Admin and I've tested it with more avaliable folders...) This is the full class where I'm trying