7zip Command Line Help

LedaOhio

Honorable
Apr 6, 2013
19
0
10,520
Looked everywhere and cannot figure out what "switch" it is to do the below and STORE the files without compression.

My IP security camera will sometimes capture 4k images and vids, especially if raining or snowing and it will take too long to archive them. Sooo, What would the correct syntax be to store them without compression?

Here is the batch file I use..
--paste--
rem taskkill /f /fi "Master eq NT AUTHORITY\SYSTEM" /im iSpyMonitor.exe
rem taskkill /f /fi "Master eq NT AUTHORITY\SYSTEM" /im iSpy.exe

rmdir /S /Q E:\Dropbox\Private\HouseCam\video\GarageCam\thumbs

7z.exe a -r E:\iSPY\"%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4% 10AM-GarageCam-VIDEO-BACKUP".7z E:\Dropbox\Private\HouseCam\video\GarageCam\*.mp4

7z.exe a -r E:\iSPY\"%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4% 10AM-GarageCam-IMAGES-BACKUP".7z E:\Dropbox\Private\HouseCam\video\GarageCam\*.jpg

del /F /S E:\Dropbox\Private\HouseCam\video\GarageCam\*.mp4
del /F /S E:\Dropbox\Private\HouseCam\video\GarageCam\*.jpg

@echo off
rem start "" "C:\Program Files\Ispy\Ispy.exe" /secondary /minimized
rem psexec \\192.168.1.25 -u Master -p B****D -c "C:\Program Files\Ispy\Ispy.exe"
exit
 
Solution
*Patting my own back*
Thanks for the help anyway.
Found a page with examples.
https://www.dotnetperls.com/7-zip-examples

Here I will show a bunch of options, and also some examples.
Compression levels:

Switch -mx0: Don't compress at all.
This is called "copy mode."

Switch -mx1: Low compression.
This is called "fastest" mode.

Switch -mx3: Fast compression mode.
Will automatically set various parameters.

Switch -mx5: Same as above, but "normal."

Switch -mx7: This means "maximum" compression.

Switch -mx9: This means "ultra" compression.
You probably want to use this.

====== IT WORKED! ======

C:\Windows\system32>7z.exe a -r -mx0 E:\iSPY\"12.12.2017...

LedaOhio

Honorable
Apr 6, 2013
19
0
10,520


C:\Windows\system32>7z.exe a -r -m=0 E:\iSPY\"%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4% 10PM-GarageCam-VIDEO-BACKUP".7z E:\Dropbox\Private\HouseCam\video\GarageCam\*.mp4

Creating archive E:\iSPY\11.12.2017 10PM-GarageCam-VIDEO-BACKUP.7z

System error:
The parameter is incorrect.

Nopers!
Damn, was hoping that was it..
Any other ideas?
 

mwryder55

Distinguished


Did you use the letter O or zero? The m parameter should handle the compression with zero being no compression.
 

LedaOhio

Honorable
Apr 6, 2013
19
0
10,520


A zero.. Duh! :p
I skimmed a few 7zip pages and it said that (-m=0) is it..
Maybe it needs placed somewhere else in the command?

 

LedaOhio

Honorable
Apr 6, 2013
19
0
10,520
*Patting my own back*
Thanks for the help anyway.
Found a page with examples.
https://www.dotnetperls.com/7-zip-examples

Here I will show a bunch of options, and also some examples.
Compression levels:

Switch -mx0: Don't compress at all.
This is called "copy mode."

Switch -mx1: Low compression.
This is called "fastest" mode.

Switch -mx3: Fast compression mode.
Will automatically set various parameters.

Switch -mx5: Same as above, but "normal."

Switch -mx7: This means "maximum" compression.

Switch -mx9: This means "ultra" compression.
You probably want to use this.

====== IT WORKED! ======

C:\Windows\system32>7z.exe a -r -mx0 E:\iSPY\"12.12.2017 10AM-GarageCam-VIDEO-BACKUP".7z E:\Dropbox\Private\HouseCam\video\GarageCam\*.mp4

7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04

Open archive: E:\iSPY\12.12.2017 10AM-GarageCam-VIDEO-BACKUP.7z
--
Path = E:\iSPY\12.12.2017 10AM-GarageCam-VIDEO-BACKUP.7z
Type = 7z
Physical Size = 1163851837
Headers Size = 4931
Method = LZMA2:24
Solid = +
Blocks = 1

Scanning the drive:
30 files, 141000189 bytes (135 MiB)

Updating archive: E:\iSPY\12.12.2017 10AM-GarageCam-VIDEO-BACKUP.7z

Items to compress: 30


Files read from disk: 30
Archive size: 1304852475 bytes (1245 MiB)
Everything is Ok

C:\Windows\system32>7z.exe a -r -mx0 E:\iSPY\"12.12.2017 10AM-GarageCam-IMAGES-BACKUP".7z E:\Dropbox\Private\HouseCam\video\GarageCam\*.jpg

7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04

Open archive: E:\iSPY\12.12.2017 10AM-GarageCam-IMAGES-BACKUP.7z
--
Path = E:\iSPY\12.12.2017 10AM-GarageCam-IMAGES-BACKUP.7z
Type = 7z
Physical Size = 53010756
Headers Size = 45116
Method = LZMA2:24
Solid = +
Blocks = 1

Scanning the drive:
361 files, 10258048 bytes (10018 KiB)

Updating archive: E:\iSPY\12.12.2017 10AM-GarageCam-IMAGES-BACKUP.7z
 
Solution