Batch unzip

Microsoft Windows xp professional w/serv...
February 22, 2010 at 07:32:13
Specs: Windows XP SP3, 1GB
Hello, I want to make a batch file which reads computer for specified archive name and when he does find it - extract contents of the archive to directory from where the batch file has been executed.

The archive is in .7z format for this to work we will need 7-Zip Command Line version

If someone knows how to use it, could you please help me with this?

Thanks in advance :)

See More: Batch unzip

Report •

February 22, 2010 at 13:49:33
Mon 02/22/2010 16:48:33++
F:\7-Zip>7z -?

7-Zip 4.45 beta  Copyright (c) 1999-2007 Igor Pavlov  2007-04-17

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

  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
  -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
  -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

Mon 02/22/2010 16:48:41++

Report •

February 22, 2010 at 13:57:04
I know this, but I'm not experienced in scripting. Maybe some scripting veterans could help?

Report •

February 22, 2010 at 14:05:03
7z x "specified archive" -r

Report •

Related Solutions

February 22, 2010 at 14:23:40
I get an error "cannot find archive"

Report •

February 23, 2010 at 02:38:44
It seems to be a tradition, for Zip-tools, to write weird error messages, when "something" is wrong. Just read the help file, it should be obvious. If it isn't, consider using other software.

Report •

February 23, 2010 at 04:23:55
"cannot find archive" isn't exactly difficult to decipher, but I think tvc and I are essentially saying the same thing: RTFM.

Report •

February 23, 2010 at 07:38:56
RTFM ? what's that supposed to mean?

Report •

Ask Question