zip and unzip

crashburn

New Member
Reaction score
0
hi everybody, i have a customer who wanted me to automate some process for him. this automation process is going to involve zipping and unzipping files.
i know xp and vista have a built in command to unzip files. i look it up online and did not work. maybe i am not using properly

does someone know how i can unzip files with windows xp/vista using the built in command in command prompt? can you give example? thanks
 
I dont think you can use the built in zip feature in Windows but you can use something like 7Zip which is portable and has a command line option. Just put the 7Zip command line executable in the same directory as the script.

You can get 7Zip at: http://www.7-zip.org/download.html

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

<Commands>
a: Add files to archive
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
-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
 
Back
Top