使用批处理文件中提取.rar文件 [英] Extract a .rar file using a batch file
问题描述
我想创建一个提取使用WinRAR的一个.rar文件的批处理文件
到C:\\ Program Files文件\\
I am trying to create a batch file which extracts a .rar file using WinRAR to C:\Program Files\
请帮忙
我尝试以下code
set rar=%ProgramFiles%\WinRAR\RAR.exe
set unrar=%programFiles%\WinRAR\UnRAR.exe
然后COM preSS是这样的:
and then you compress like this:
"%rar%" a "drop location" "target location"
或DECOM preSS是这样的:
or decompress like this:
%unrar% e "target location"
但我似乎并没有在这里看到一个选项,它显示了目标RAR文件的。请帮我。
but I don't seem to see an option here which shows where the target rar file is. Please help me.
推荐答案
查看此网页:的 http://comptb.cects.com/using-the-winrar-command-line-tools-in-windows/
基本上(从该网站获得):
Basically (taken from that site):
RAR一个-r yourfiles.rar * .TXT C:\\ yourfolder
来COM preSS的东西。
rar a -r yourfiles.rar *.txt c:\yourfolder
to compress something
的unrar中√c:\\ yourfile.rar * .gif注意:C:\\ extractfolder \\
来uncom preSS的东西。
unrar x c:\yourfile.rar *.gif c:\extractfolder\
to uncompress something
的* .txt和* .gif注意用于过滤文件类型和可被省略。
The *.txt and *.gif are used for filtering file types and can be omitted.
在页面的底部,也链接到两个示例批处理文件。
At the bottom of the page are also links to two example batch files.
这篇关于使用批处理文件中提取.rar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!