help me !! use command line 7z.exe to extract,compress files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sonyman
Posts: 10
Joined: 25 Oct 2014 01:01

help me !! use command line 7z.exe to extract,compress files

#1 Post by sonyman » 20 Mar 2015 02:44

i have a file flash.zip
into flash.zip

meta-inf\com\google\android\
update-binary
updater-script
(update-binary & updater-script this is a files)

i want using command line to compress other file updater-script into flash.zip
overwrite red file for blue file

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: help me !! use command line 7z.exe to extract,compress f

#2 Post by ShadowThief » 20 Mar 2015 03:18

So you want to add updater-script to flash.zip, overwriting the existing updater-script file that already exists in the archive?

AiroNG
Posts: 46
Joined: 17 Nov 2013 15:00
Location: Germany

Re: help me !! use command line 7z.exe to extract,compress f

#3 Post by AiroNG » 20 Mar 2015 14:10

<evilmode>
how 'bout: googling a bit and reading?
Honestly... it took me longer to write this post than to google for the 7z commandline help...</evilmode>

Or you could just go:

Code: Select all

D:\>7z.exe -h

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]

<Commands>
  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
<Switches>
  -ai[r[-|0]]{@listfile|!wildcard}: Include archives
  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
  -bd: Disable percentage indicator
  -i[r[-|0]]{@listfile|!wildcard}: Include filenames
  -m{Parameters}: set compression Method
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  -scs{UTF-8 | WIN | DOS}: set charset for list files
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout
  -ssc[-]: set sensitive case mode
  -ssw: compress shared files
  -t{Type}: Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
  -v{Size}[b|k|m|g]: Create volumes
  -w[{path}]: assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
  -y: assume Yes on all queries

D:\>


The rest is just trial and error. If you still need assistance please be as specific as you can.

sonyman
Posts: 10
Joined: 25 Oct 2014 01:01

Re: help me !! use command line 7z.exe to extract,compress f

#4 Post by sonyman » 20 Mar 2015 21:03

ShadowThief wrote:So you want to add updater-script to flash.zip, overwriting the existing updater-script file that already exists in the archive?

yes sir
can u help me ?

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: help me !! use command line 7z.exe to extract,compress f

#5 Post by ShadowThief » 20 Mar 2015 21:34

sonyman wrote:
ShadowThief wrote:So you want to add updater-script to flash.zip, overwriting the existing updater-script file that already exists in the archive?

yes sir
can u help me ?

AiroNG's got a pretty good description of how to use 7-Zip's command line version. I recommend looking at that. Specifically the a and u commands.

Post Reply