【问题标题】:Extract a .rar file using a batch file使用批处理文件提取 .rar 文件
【发布时间】:2014-07-03 18:33:02
【问题描述】:

我正在尝试创建一个使用 WinRAR 提取 .rar 文件的批处理文件 到 C:\Program Files\

请帮忙

我尝试了以下代码

set rar=%ProgramFiles%\WinRAR\RAR.exe

set unrar=%programFiles%\WinRAR\UnRAR.exe

然后你像这样压缩:

"%rar%" a "drop location" "target location"

或者像这样解压:

%unrar% e "target location"

但我似乎在这里没有看到显示目标 rar 文件位置的选项。请帮帮我。

【问题讨论】:

    标签: batch-file


    【解决方案1】:

    查看此页面:https://cects.com/using-the-winrar-command-line-tools-in-windows/

    基本上(取自该网站):

    rar a -r yourfiles.rar *.txt c:\yourfolder 压缩一些东西

    unrar x c:\yourfile.rar *.gif c:\extractfolder\ 解压缩

    *.txt 和 *.gif 用于过滤文件类型,可以省略。

    页面底部还有两个示例批处理文件的链接。

    【讨论】:

    • 非常感谢 Rocks25 :D
    • 没问题 :) 你介意将我的答案标记为正确吗?
    猜你喜欢
    • 2020-08-04
    • 1970-01-01
    • 1970-01-01
    • 2016-09-05
    • 1970-01-01
    • 2012-07-23
    • 2015-04-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多