Command: p7zip

  7-Zip is a file archiver with the highest compression ratios.
  P7ZIP is a quick port of 7za.exe (command line version of 7zip),
  ver 4.65.
  P7ZIPR is a port of 7zr, ver 4.65.
  7z   uses plugins to handle archives.
  7za  is a stand-alone executable.
  7za  handles less archive formats than 7z.exe.
  7zr  is a light stand-alone executable that supports only 7z/LZMA/
       BCJ/BCJ2

Syntax:

  p7zip <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 (see the manual)
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  (CAUTION: this flag does not do what you think, avoid using it)
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout (eg: 7z a dummy -tgzip -so Doc.txt >
       archive.gz)
  -ssc[-]: set sensitive case mode
  -t{Type}: Set type of archive
  -v{Size}[b|k|m|g]: Create volumes
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
  -w[path]: assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
  -y: assume Yes on all queries

Comments:

  P7ZIP has the following ERRORLEVEL / EXITCODES:
    0  No error
    1  Warning (Non fatal error(s)). For example, one or more files were
       locked by some other application, so they were not compressed.
    2  Fatal error
    7  Command line error
    8  Not enough memory for operation
  255  User stopped the process
  For more information see:
  C:\UTIL\P7ZIP OR:
  https://gitlab.com/FreeDOS/archiver/p7zip/-/tree/master/ARCHIVER/
  P7ZIP/MANUAL?ref_type=heads OR:
  https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/
  repositories/latest/archiver/
  Comment: I am not sure if all commands and switches work correct.

Examples:

  p7zip a D:\test.zip C:
  p7zip l D:\test.zip
  (maybe you get RAM problems)

See also:

  7zdec
  arj
  bzip2
  cabext
  errorlevel/exitcode
  gzip
  lpq1
  lzip
  lzma
  lzop
  slicer
  tar
  unzip
  zip
  zoo

  Copyright © 1999-2009 Igor Pavlov, help version 2023 W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.