如何使用命令行解压文件?

时间:2022-11-26 11:52:24

Can I unzip files through the command line? Preferably using open source/free tools.

我可以通过命令行解压文件吗?最好使用开源/免费工具。

10 个解决方案

#1


37  

You could use :

您可以使用:

http://membrane.com/synapse/library/pkunzip.html

http://membrane.com/synapse/library/pkunzip.html

or

7zip: http://www.7-zip.org/download.html

7 zip:http://www.7-zip.org/download.html

Free byte zip: http://www.freebyte.com/fbzip/

免费的字节邮政编码:http://www.freebyte.com/fbzip/

or infozip: http://infozip.sourceforge.net/

或infozip:http://infozip.sourceforge.net/

#2


184  

If you already have java on your PC, and the bin directory is in your path (in most cases), you can use the command line:

如果您的PC上已经有了java,并且bin目录在您的路径中(在大多数情况下),您可以使用命令行:

jar xf test.zip

or if not in your path:

或者如果不是在你的道路上:

C:\Java\jdk1.6.0_03\bin>jar xf test.zip

Complete set of options for the jar tool available here.

这里提供的jar工具的完整选项集。

Examples:

例子:

Extract jar file
    jar x[v]f jarfile [inputfiles] [-Joption] 
    jar x[v] [inputfiles] [-Joption]

#3


35  

Firstly, write an unzip utility using vbscript to trigger the native unzip functionality in Windows. Then pipe out the script from within your batch file and then call it. Then it's as good as stand alone. I've done it in the past for numerous tasks. This way it does not require need of third party applications, just the one batch file that does everything.

首先,使用vbscript编写一个unzip实用程序来触发Windows中的本机unzip功能。然后从批处理文件中导出脚本,然后调用它。那就像独自站着一样好。我以前做过很多工作。通过这种方式,它不需要第三方应用程序,只需要一个批处理文件就可以了。

I put an example on my blog on how to unzip a file using a batch file:

我在博客上举了一个使用批处理文件解压文件的例子:

' j_unzip.vbs
'
' UnZip a file script
'
' By Justin Godden 2010
'
' It's a mess, I know!!!
'

' Dim ArgObj, var1, var2
Set ArgObj = WScript.Arguments

If (Wscript.Arguments.Count > 0) Then
 var1 = ArgObj(0)
Else
 var1 = ""
End if

If var1 = "" then
 strFileZIP = "example.zip"
Else
 strFileZIP = var1
End if

'The location of the zip file.
REM Set WshShell = CreateObject("Wscript.Shell")
REM CurDir = WshShell.ExpandEnvironmentStrings("%%cd%%")
Dim sCurPath
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
strZipFile = sCurPath & "\" & strFileZIP
'The folder the contents should be extracted to.
outFolder = sCurPath & "\"

 WScript.Echo ( "Extracting file " & strFileZIP)

Set objShell = CreateObject( "Shell.Application" )
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptions

 WScript.Echo ( "Extracted." )

' This bit is for testing purposes
REM Dim MyVar
REM MyVar = MsgBox ( strZipFile, 65, "MsgBox Example"

Use it like this:

使用它是这样的:

cscript //B j_unzip.vbs zip_file_name_goes_here.zip

#4


26  

7-Zip, it's open source, free and supports a wide range of formats.

7-Zip,它是开源的,免费并且支持多种格式。

7z.exe x myarchive.zip

#5


14  

As other have alluded, 7-zip is great.

就像其他人提到的,7-zip是很好的。

Note: I am going to zip and then unzip a file. Unzip is at the bottom.

注意:我将压缩文件,然后解压文件。Unzip在底部。

My contribution:

我的贡献:

Get the

得到了

7-Zip Command Line Version

7 - zip命令行版本

Current URL

当前URL

http://www.7-zip.org/download.html

http://www.7-zip.org/download.html

The syntax?

语法吗?

You can put the following into a .bat file

您可以将以下内容放入.bat文件中。

"C:\Program Files\7-Zip\7z.exe" a MySuperCoolZipFile.zip "C:\MyFiles\*.jpg" -pmypassword -r -w"C:\MyFiles\" -mem=AES256

I've shown a few options.

我已经展示了一些选项。

-r is recursive. Usually what you want with zip functionality.

- r是递归的。通常你想要的zip功能。

a is for "archive". That's the name of the output zip file.

一个是“存档”。这是输出zip文件的名称。

-p is for a password (optional)

-p是密码(可选)

-w is a the source directory. This will nest your files correctly in the zip file, without extra folder information.

w是源目录。这将正确地将文件嵌套到zip文件中,而不需要额外的文件夹信息。

-mem is the encryption strength.

-mem为加密强度。

There are others. But the above will get you running.

有别人。但以上这些会让你跑起来。

NOTE: Adding a password will make the zip file unfriendly when it comes to viewing the file through Windows Explorer. The client may need their own copy of 7-zip (or winzip or other) to view the contents of the file.

注意:在使用Windows资源管理器查看文件时,添加密码将使zip文件不友好。客户端可能需要自己的7-zip(或winzip或其他)副本来查看文件的内容。

EDIT::::::::::::(just extra stuff).

编辑::::::::::::(只是额外的东西)。

There is a "command line" version which is probably better suited for this: http://www.7-zip.org/download.html

有一个“命令行”版本可能更适合这个版本:http://www.7-zip.org/download.html

(current (at time of writing) direct link) http://sourceforge.net/projects/sevenzip/files/7-Zip/9.20/7za920.zip/download

(目前(写作时)直接链接)http://sourceforge.net/projects/sevenzip/files/7-Zip/9.20/7za920.zip/download

So the zip command would be (with the command line version of the 7 zip tool).

所以zip命令将是(使用命令行版本的7 zip工具)。

"C:\WhereIUnzippedCommandLineStuff\7za.exe" a MySuperCoolZipFile.zip "C:\MyFiles\*.jpg" -pmypassword -r -w"C:\MyFiles\" -mem=AES256

Now the unzip portion: (to unzip the file you just created)

现在解压部分:(解压刚才创建的文件)

"C:\WhereIUnzippedCommandLineStuff\7zipCommandLine\7za.exe" e MySuperCoolZipFile.zip "*.*" -oC:\SomeOtherFolder\MyUnzippedFolder -pmypassword -y -r

Documentation here:

文档:

http://sevenzip.sourceforge.jp/chm/cmdline/commands/extract.htm

http://sevenzip.sourceforge.jp/chm/cmdline/commands/extract.htm

#6


9  

Thanks Rich, I will take note of that. So here is the script for my own solution. It requires no third party unzip tools.

谢谢Rich,我会注意的。这是我自己解决方案的脚本。它不需要第三方解压缩工具。

Include the script below at the start of the batch file to create the function, and then to call the function, the command is... cscript /B j_unzip.vbs zip_file_name_goes_here.zip

在批处理文件的开头包含下面的脚本以创建函数,然后调用函数,命令是…cscript / B j_unzip。根据zip_file_name_goes_here.zip

Here is the script to add to the top...

下面是添加到顶部的脚本…

REM Changing working folder back to current directory for Vista & 7 compatibility
%~d0
CD %~dp0
REM Folder changed

REM This script upzip's files...

    > j_unzip.vbs ECHO '
    >> j_unzip.vbs ECHO ' UnZip a file script
    >> j_unzip.vbs ECHO '
    >> j_unzip.vbs ECHO ' It's a mess, I know!!!
    >> j_unzip.vbs ECHO '
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO ' Dim ArgObj, var1, var2
    >> j_unzip.vbs ECHO Set ArgObj = WScript.Arguments
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO If (Wscript.Arguments.Count ^> 0) Then
    >> j_unzip.vbs ECHO. var1 = ArgObj(0)
    >> j_unzip.vbs ECHO Else
    >> j_unzip.vbs ECHO. var1 = ""
    >> j_unzip.vbs ECHO End if
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO If var1 = "" then
    >> j_unzip.vbs ECHO. strFileZIP = "example.zip"
    >> j_unzip.vbs ECHO Else
    >> j_unzip.vbs ECHO. strFileZIP = var1
    >> j_unzip.vbs ECHO End if
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO 'The location of the zip file.
    >> j_unzip.vbs ECHO REM Set WshShell = CreateObject("Wscript.Shell")
    >> j_unzip.vbs ECHO REM CurDir = WshShell.ExpandEnvironmentStrings("%%cd%%")
    >> j_unzip.vbs ECHO Dim sCurPath
    >> j_unzip.vbs ECHO sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
    >> j_unzip.vbs ECHO strZipFile = sCurPath ^& "\" ^& strFileZIP
    >> j_unzip.vbs ECHO 'The folder the contents should be extracted to.
    >> j_unzip.vbs ECHO outFolder = sCurPath ^& "\"
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO. WScript.Echo ( "Extracting file " ^& strFileZIP)
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO Set objShell = CreateObject( "Shell.Application" )
    >> j_unzip.vbs ECHO Set objSource = objShell.NameSpace(strZipFile).Items()
    >> j_unzip.vbs ECHO Set objTarget = objShell.NameSpace(outFolder)
    >> j_unzip.vbs ECHO intOptions = 256
    >> j_unzip.vbs ECHO objTarget.CopyHere objSource, intOptions
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO. WScript.Echo ( "Extracted." )
    >> j_unzip.vbs ECHO.

#7


8  

There is an article on getting to the built-in Windows .ZIP file handling with VBscript here:

这里有一篇关于如何使用VBscript来处理内置Windows .ZIP文件的文章:

http://www.aspfree.com/c/a/Windows-Scripting/Compressed-Folders-in-WSH/3/

http://www.aspfree.com/c/a/Windows-Scripting/Compressed-Folders-in-WSH/3/

(The last code blurb deals with extraction)

(最后一个代码简介涉及到提取)

#8


2  

Grab an executable from info-zip.

从info-zip中获取可执行文件。

Info-ZIP supports hardware from microcomputers all the way up to Cray supercomputers, running on almost all versions of Unix, VMS, OS/2, Windows 9x/NT/etc. (a.k.a. Win32), Windows 3.x, Windows CE, MS-DOS, AmigaDOS, Atari TOS, Acorn RISC OS, BeOS, Mac OS, SMS/QDOS, MVS and OS/390 OE, VM/CMS, FlexOS, Tandem NSK and Human68K (Japanese). There is also some (old) support for LynxOS, TOPS-20, AOS/VS and Novell NLMs. Shared libraries (DLLs) are available for Unix, OS/2, Win32 and Win16, and graphical interfaces are available for Win32, Win16, WinCE and Mac OS.

infozip支持从微型计算机到Cray超级计算机的硬件,运行在几乎所有版本的Unix、vm、OS/2、Windows 9x/NT/等等。(也称为Win32),Windows 3。x, Windows CE, MS-DOS, AmigaDOS, Atari TOS, Acorn RISC OS, BeOS, Mac OS, SMS/QDOS, MVS和OS/390 OE, VM/CMS, FlexOS,双人NSK和Human68K(日语)。对于LynxOS、TOPS-20、AOS/VS和Novell NLMs也有一些(旧的)支持。共享库(DLLs)可用于Unix、OS/2、Win32和Win16,图形界面可用于Win32、Win16、WinCE和Mac OS。

#9


1  

Copy the below code to a batch file and execute. Below requires Winzip to be installed/accessible from your machine. Do change variables as per your need.

将下面的代码复制到批处理文件中并执行。以下要求Winzip安装/可从您的计算机访问。根据需要改变变量。

@ECHO OFF
SET winzip_path="C:\Program Files\WinZip"
SET source_path="C:\Test"
SET output_path="C:\Output\"
SET log_file="C:\Test\unzip_log.txt"
SET file_name="*.zip"

cd %source_path%
echo Executing for %source_path% > %log_file%

FOR /f "tokens=*" %%G IN ('dir %file_name% /b') DO (
echo Processing : %%G
echo File_Name : %%G >> %log_file%
%winzip_path%\WINZIP32.EXE -e %%G %output_path%
)

PAUSE

#10


1  

Originally ZIP files were created with MS-DOS command line software from PKWare, the two programs were PKZIP.EXE and PKUNZIP.EXE. I think you can still download PKUNZIP at the PKWare site here:

原来ZIP文件是用PKWare的MS-DOS命令行软件创建的,两个程序是PKZIP。EXE和PKUNZIP.EXE。我想你还可以在PKWare网站上下载PKUNZIP:

http://www.pkware.com/software-pkzip/dos-compression

http://www.pkware.com/software-pkzip/dos-compression

The actual command line could look something like this:

实际的命令行可以如下所示:

C:\>pkunzip c:\myzipfile.zip c:\extracttothisfolder\

#1


37  

You could use :

您可以使用:

http://membrane.com/synapse/library/pkunzip.html

http://membrane.com/synapse/library/pkunzip.html

or

7zip: http://www.7-zip.org/download.html

7 zip:http://www.7-zip.org/download.html

Free byte zip: http://www.freebyte.com/fbzip/

免费的字节邮政编码:http://www.freebyte.com/fbzip/

or infozip: http://infozip.sourceforge.net/

或infozip:http://infozip.sourceforge.net/

#2


184  

If you already have java on your PC, and the bin directory is in your path (in most cases), you can use the command line:

如果您的PC上已经有了java,并且bin目录在您的路径中(在大多数情况下),您可以使用命令行:

jar xf test.zip

or if not in your path:

或者如果不是在你的道路上:

C:\Java\jdk1.6.0_03\bin>jar xf test.zip

Complete set of options for the jar tool available here.

这里提供的jar工具的完整选项集。

Examples:

例子:

Extract jar file
    jar x[v]f jarfile [inputfiles] [-Joption] 
    jar x[v] [inputfiles] [-Joption]

#3


35  

Firstly, write an unzip utility using vbscript to trigger the native unzip functionality in Windows. Then pipe out the script from within your batch file and then call it. Then it's as good as stand alone. I've done it in the past for numerous tasks. This way it does not require need of third party applications, just the one batch file that does everything.

首先,使用vbscript编写一个unzip实用程序来触发Windows中的本机unzip功能。然后从批处理文件中导出脚本,然后调用它。那就像独自站着一样好。我以前做过很多工作。通过这种方式,它不需要第三方应用程序,只需要一个批处理文件就可以了。

I put an example on my blog on how to unzip a file using a batch file:

我在博客上举了一个使用批处理文件解压文件的例子:

' j_unzip.vbs
'
' UnZip a file script
'
' By Justin Godden 2010
'
' It's a mess, I know!!!
'

' Dim ArgObj, var1, var2
Set ArgObj = WScript.Arguments

If (Wscript.Arguments.Count > 0) Then
 var1 = ArgObj(0)
Else
 var1 = ""
End if

If var1 = "" then
 strFileZIP = "example.zip"
Else
 strFileZIP = var1
End if

'The location of the zip file.
REM Set WshShell = CreateObject("Wscript.Shell")
REM CurDir = WshShell.ExpandEnvironmentStrings("%%cd%%")
Dim sCurPath
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
strZipFile = sCurPath & "\" & strFileZIP
'The folder the contents should be extracted to.
outFolder = sCurPath & "\"

 WScript.Echo ( "Extracting file " & strFileZIP)

Set objShell = CreateObject( "Shell.Application" )
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptions

 WScript.Echo ( "Extracted." )

' This bit is for testing purposes
REM Dim MyVar
REM MyVar = MsgBox ( strZipFile, 65, "MsgBox Example"

Use it like this:

使用它是这样的:

cscript //B j_unzip.vbs zip_file_name_goes_here.zip

#4


26  

7-Zip, it's open source, free and supports a wide range of formats.

7-Zip,它是开源的,免费并且支持多种格式。

7z.exe x myarchive.zip

#5


14  

As other have alluded, 7-zip is great.

就像其他人提到的,7-zip是很好的。

Note: I am going to zip and then unzip a file. Unzip is at the bottom.

注意:我将压缩文件,然后解压文件。Unzip在底部。

My contribution:

我的贡献:

Get the

得到了

7-Zip Command Line Version

7 - zip命令行版本

Current URL

当前URL

http://www.7-zip.org/download.html

http://www.7-zip.org/download.html

The syntax?

语法吗?

You can put the following into a .bat file

您可以将以下内容放入.bat文件中。

"C:\Program Files\7-Zip\7z.exe" a MySuperCoolZipFile.zip "C:\MyFiles\*.jpg" -pmypassword -r -w"C:\MyFiles\" -mem=AES256

I've shown a few options.

我已经展示了一些选项。

-r is recursive. Usually what you want with zip functionality.

- r是递归的。通常你想要的zip功能。

a is for "archive". That's the name of the output zip file.

一个是“存档”。这是输出zip文件的名称。

-p is for a password (optional)

-p是密码(可选)

-w is a the source directory. This will nest your files correctly in the zip file, without extra folder information.

w是源目录。这将正确地将文件嵌套到zip文件中,而不需要额外的文件夹信息。

-mem is the encryption strength.

-mem为加密强度。

There are others. But the above will get you running.

有别人。但以上这些会让你跑起来。

NOTE: Adding a password will make the zip file unfriendly when it comes to viewing the file through Windows Explorer. The client may need their own copy of 7-zip (or winzip or other) to view the contents of the file.

注意:在使用Windows资源管理器查看文件时,添加密码将使zip文件不友好。客户端可能需要自己的7-zip(或winzip或其他)副本来查看文件的内容。

EDIT::::::::::::(just extra stuff).

编辑::::::::::::(只是额外的东西)。

There is a "command line" version which is probably better suited for this: http://www.7-zip.org/download.html

有一个“命令行”版本可能更适合这个版本:http://www.7-zip.org/download.html

(current (at time of writing) direct link) http://sourceforge.net/projects/sevenzip/files/7-Zip/9.20/7za920.zip/download

(目前(写作时)直接链接)http://sourceforge.net/projects/sevenzip/files/7-Zip/9.20/7za920.zip/download

So the zip command would be (with the command line version of the 7 zip tool).

所以zip命令将是(使用命令行版本的7 zip工具)。

"C:\WhereIUnzippedCommandLineStuff\7za.exe" a MySuperCoolZipFile.zip "C:\MyFiles\*.jpg" -pmypassword -r -w"C:\MyFiles\" -mem=AES256

Now the unzip portion: (to unzip the file you just created)

现在解压部分:(解压刚才创建的文件)

"C:\WhereIUnzippedCommandLineStuff\7zipCommandLine\7za.exe" e MySuperCoolZipFile.zip "*.*" -oC:\SomeOtherFolder\MyUnzippedFolder -pmypassword -y -r

Documentation here:

文档:

http://sevenzip.sourceforge.jp/chm/cmdline/commands/extract.htm

http://sevenzip.sourceforge.jp/chm/cmdline/commands/extract.htm

#6


9  

Thanks Rich, I will take note of that. So here is the script for my own solution. It requires no third party unzip tools.

谢谢Rich,我会注意的。这是我自己解决方案的脚本。它不需要第三方解压缩工具。

Include the script below at the start of the batch file to create the function, and then to call the function, the command is... cscript /B j_unzip.vbs zip_file_name_goes_here.zip

在批处理文件的开头包含下面的脚本以创建函数,然后调用函数,命令是…cscript / B j_unzip。根据zip_file_name_goes_here.zip

Here is the script to add to the top...

下面是添加到顶部的脚本…

REM Changing working folder back to current directory for Vista & 7 compatibility
%~d0
CD %~dp0
REM Folder changed

REM This script upzip's files...

    > j_unzip.vbs ECHO '
    >> j_unzip.vbs ECHO ' UnZip a file script
    >> j_unzip.vbs ECHO '
    >> j_unzip.vbs ECHO ' It's a mess, I know!!!
    >> j_unzip.vbs ECHO '
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO ' Dim ArgObj, var1, var2
    >> j_unzip.vbs ECHO Set ArgObj = WScript.Arguments
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO If (Wscript.Arguments.Count ^> 0) Then
    >> j_unzip.vbs ECHO. var1 = ArgObj(0)
    >> j_unzip.vbs ECHO Else
    >> j_unzip.vbs ECHO. var1 = ""
    >> j_unzip.vbs ECHO End if
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO If var1 = "" then
    >> j_unzip.vbs ECHO. strFileZIP = "example.zip"
    >> j_unzip.vbs ECHO Else
    >> j_unzip.vbs ECHO. strFileZIP = var1
    >> j_unzip.vbs ECHO End if
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO 'The location of the zip file.
    >> j_unzip.vbs ECHO REM Set WshShell = CreateObject("Wscript.Shell")
    >> j_unzip.vbs ECHO REM CurDir = WshShell.ExpandEnvironmentStrings("%%cd%%")
    >> j_unzip.vbs ECHO Dim sCurPath
    >> j_unzip.vbs ECHO sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
    >> j_unzip.vbs ECHO strZipFile = sCurPath ^& "\" ^& strFileZIP
    >> j_unzip.vbs ECHO 'The folder the contents should be extracted to.
    >> j_unzip.vbs ECHO outFolder = sCurPath ^& "\"
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO. WScript.Echo ( "Extracting file " ^& strFileZIP)
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO Set objShell = CreateObject( "Shell.Application" )
    >> j_unzip.vbs ECHO Set objSource = objShell.NameSpace(strZipFile).Items()
    >> j_unzip.vbs ECHO Set objTarget = objShell.NameSpace(outFolder)
    >> j_unzip.vbs ECHO intOptions = 256
    >> j_unzip.vbs ECHO objTarget.CopyHere objSource, intOptions
    >> j_unzip.vbs ECHO.
    >> j_unzip.vbs ECHO. WScript.Echo ( "Extracted." )
    >> j_unzip.vbs ECHO.

#7


8  

There is an article on getting to the built-in Windows .ZIP file handling with VBscript here:

这里有一篇关于如何使用VBscript来处理内置Windows .ZIP文件的文章:

http://www.aspfree.com/c/a/Windows-Scripting/Compressed-Folders-in-WSH/3/

http://www.aspfree.com/c/a/Windows-Scripting/Compressed-Folders-in-WSH/3/

(The last code blurb deals with extraction)

(最后一个代码简介涉及到提取)

#8


2  

Grab an executable from info-zip.

从info-zip中获取可执行文件。

Info-ZIP supports hardware from microcomputers all the way up to Cray supercomputers, running on almost all versions of Unix, VMS, OS/2, Windows 9x/NT/etc. (a.k.a. Win32), Windows 3.x, Windows CE, MS-DOS, AmigaDOS, Atari TOS, Acorn RISC OS, BeOS, Mac OS, SMS/QDOS, MVS and OS/390 OE, VM/CMS, FlexOS, Tandem NSK and Human68K (Japanese). There is also some (old) support for LynxOS, TOPS-20, AOS/VS and Novell NLMs. Shared libraries (DLLs) are available for Unix, OS/2, Win32 and Win16, and graphical interfaces are available for Win32, Win16, WinCE and Mac OS.

infozip支持从微型计算机到Cray超级计算机的硬件,运行在几乎所有版本的Unix、vm、OS/2、Windows 9x/NT/等等。(也称为Win32),Windows 3。x, Windows CE, MS-DOS, AmigaDOS, Atari TOS, Acorn RISC OS, BeOS, Mac OS, SMS/QDOS, MVS和OS/390 OE, VM/CMS, FlexOS,双人NSK和Human68K(日语)。对于LynxOS、TOPS-20、AOS/VS和Novell NLMs也有一些(旧的)支持。共享库(DLLs)可用于Unix、OS/2、Win32和Win16,图形界面可用于Win32、Win16、WinCE和Mac OS。

#9


1  

Copy the below code to a batch file and execute. Below requires Winzip to be installed/accessible from your machine. Do change variables as per your need.

将下面的代码复制到批处理文件中并执行。以下要求Winzip安装/可从您的计算机访问。根据需要改变变量。

@ECHO OFF
SET winzip_path="C:\Program Files\WinZip"
SET source_path="C:\Test"
SET output_path="C:\Output\"
SET log_file="C:\Test\unzip_log.txt"
SET file_name="*.zip"

cd %source_path%
echo Executing for %source_path% > %log_file%

FOR /f "tokens=*" %%G IN ('dir %file_name% /b') DO (
echo Processing : %%G
echo File_Name : %%G >> %log_file%
%winzip_path%\WINZIP32.EXE -e %%G %output_path%
)

PAUSE

#10


1  

Originally ZIP files were created with MS-DOS command line software from PKWare, the two programs were PKZIP.EXE and PKUNZIP.EXE. I think you can still download PKUNZIP at the PKWare site here:

原来ZIP文件是用PKWare的MS-DOS命令行软件创建的,两个程序是PKZIP。EXE和PKUNZIP.EXE。我想你还可以在PKWare网站上下载PKUNZIP:

http://www.pkware.com/software-pkzip/dos-compression

http://www.pkware.com/software-pkzip/dos-compression

The actual command line could look something like this:

实际的命令行可以如下所示:

C:\>pkunzip c:\myzipfile.zip c:\extracttothisfolder\