7zip

Extract files to same folder as archive using recursive to search all directories

僤鯓⒐⒋嵵緔 提交于 2020-01-03 05:19:07
问题 I'm working on an automation task in PowerShell that extracts the contents of several .tar archives to their respective subfolders using recursion and the 7z.exe utility. Im running into an issue where the output dumps in my working directory instead of the subdirectory gci -r found the original tarball. So far I have: $files=gci -r | where {$_.Extension -match "tar"} foreach ($files in $files) { c:\7z.exe e -y $file.FullName } Advice on setting the working directory within the loop or 7z

Recognize a 7z SFX from binary contents

半世苍凉 提交于 2020-01-03 00:53:09
问题 how it's possible to recognize a 7z SFX ( self extracting EXE ) File from its Binary contents , is there any offset to start from or specific bytes to look for or Both ?. many thanks 回答1: Google is your friend. First result after searching "7zip header". The documentation says this is the 7zip signature: BYTE kSignature[6] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; You should read the first 6 bytes of the file. If that 6 byte sequence is the same as the kSignature above, then the file should be a

Importing zipped files in Mysql using CMD

人走茶凉 提交于 2020-01-01 16:39:10
问题 I am trying to import zipped database files into Mysql using command prompt using the following command 7z < backup.sql.7z | mysql -u root test The root user don't have any password associated with it. test is my target blank database. I use 7zip for unzipping purpose. The zipped database i.e. backup.sql.7z is located in D drive. But it's giving the following error So, instead I used the following command 7z < backup.7z | mysql -u root test Note : This time I am using backup.7z instead of

7zip Self Extracting Archive (SFX) without administrator privileges

泄露秘密 提交于 2020-01-01 08:47:52
问题 I use 7zip to create the SFX as follows: 7z.exe a -r archive.7z * Then I do a binary copy with the 7zS.sfx file (used to create a self extracting installer), config file "build.config", and the archive. The contents of config file are as follows: ;!@Install@!UTF-8! RunProgram="setup.exe" GUIMode="1" Path="%tmp%\\mytemp" ;!@InstallEnd@! Binary copy command is as follows: copy /b 7zS.sfx + build.config + archive.7z sfxInstaller.exe Problem is that the result SFX "sfxInstaller.exe" requires

7zip Self Extracting Archive (SFX) without administrator privileges

北城以北 提交于 2020-01-01 08:47:09
问题 I use 7zip to create the SFX as follows: 7z.exe a -r archive.7z * Then I do a binary copy with the 7zS.sfx file (used to create a self extracting installer), config file "build.config", and the archive. The contents of config file are as follows: ;!@Install@!UTF-8! RunProgram="setup.exe" GUIMode="1" Path="%tmp%\\mytemp" ;!@InstallEnd@! Binary copy command is as follows: copy /b 7zS.sfx + build.config + archive.7z sfxInstaller.exe Problem is that the result SFX "sfxInstaller.exe" requires

7zip compress network stream

廉价感情. 提交于 2019-12-30 07:11:59
问题 I will like to compress a file before sending it through the network. I think the best approach is 7zip because it is free and open source. How I use 7zip with .net? I know that 7zip is free and that they have the source code in c# but for some reason it is very slow on c# so I rather call the dll 7z.dll that comes when installing 7zip for performance reasons. So the way I am able to eassily marshal and call the methods in 7z.dll is with the help of the library called sevenzipsharp . For

Remove extension from filename

放肆的年华 提交于 2019-12-25 05:35:09
问题 In folder1 I have a list of files: file1.exe ahahdf.exe ahdfkqkq.exe I want to run a script and have it create the following files in folder2: file1.zip ahahdf.zip ahdfkqkq.zip My attempt: for %%f in (*.*) do "c:\program files\7-zip\7z.exe" a %%f.zip %%f This creates file1.exe.zip , ... but I need file1.zip , ... (without the .exe extension). How can I do this? 回答1: Should be for %%f in (*.*) do "c:\program files\7-zip\7z.exe" a %%~nf.zip %%f Note %%~nf - ~n tells command interpreter to pick

using Windows send-to for creating a one step send to>zip>to email

爱⌒轻易说出口 提交于 2019-12-25 03:45:31
问题 In another post on Stack Overflow a user named James L. presented a useful script for adding 7-Zip to the Send to Options in Windows. I was wondering how hard it would be to take that same principle one more step by sending the results on to be attached to an email? Most of the zips I create are done in order to email them and this would cut that down to one click. The only obstacle being that it could not create a self-extracting ".exe" file to be attached. 回答1: Here are three scripts you

How to develop incremental compression/decompression in LZMA SDK?

廉价感情. 提交于 2019-12-24 17:43:40
问题 I'm using the LZMA SDK for file compression/decompression (LZMA is the default algorithm used in 7-zip) under Windows 7 (64 bits). The sdk can be found here (source code) http://7-zip.org/sdk.html To compress/decompress the file i can use the following command. ./LzmaUtil.exe e input.elf output.elf ./LzmaUtil.exe d output.elf input.elf I'm using CAN BUS (must use it : client spec) to flash the binary file from the HOST to the MCU. In order to speed up the flashing process. I want to make

7zip produces different output from identical input

心已入冬 提交于 2019-12-24 12:13:25
问题 I'm using command line 7zip to zip up the contents of a folder (in Windows) thus: 7za a myzip.zip * -tzip -r I've discovered that running exactly the same command line twice will produce two different ZIP files - they've got the same size but if you run a binary compare (ie fc /b file1.zip file2.zip) they are different. To complicate matters it seems that if you make the two zips in rapid succession then they are the same. But if you do them on different days or separated by a few hours they