Rar 命令 - 忽略某些文件夹

发布于 2024-07-22 05:09:49 字数 91 浏览 3 评论 0原文

我想 rar 一个文件夹,但排除某些文件夹及其下面的所有文件 - .svn 文件夹。

如何使用 rar 控制台命令 (rar.exe) 实现这一点?

I would like to rar a folder but exclude a certain of folders and all the files beneath them - the .svn folder.

How could I make this happen using the rar console command (rar.exe)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

醉酒的小男人 2024-07-29 05:09:49

你试过-x.svn*吗

Have you tried -x.svn*

羅雙樹 2024-07-29 05:09:49

我尝试了以下方法,它对我有用:

RAR a -ehs -x*\.svn\* -r

I tried the following and it worked for me:

RAR a -ehs -x*\.svn\* -r
心清如水 2024-07-29 05:09:49
dir .svn /b /s > files.lst
rar (rest of command) [email protected]
dir .svn /b /s > files.lst
rar (rest of command) [email protected]
初见你 2024-07-29 05:09:49

您可以执行 svn 导出,那么您首先就不会拥有 .svn 文件夹。

You could do an svn export, then you wouldn't have the .svn folders in the first place.

池予 2024-07-29 05:09:49

您必须包含完全限定的路径及其子结构。
该路径必须是规范的。

popdir %mypath%\.svn
set _=%cd%
pushdir

rar a -x%_% -x%_%\* myarchive

You have to include the fully qualified path and it's substructures.
The path has to be canonical.

popdir %mypath%\.svn
set _=%cd%
pushdir

rar a -x%_% -x%_%\* myarchive
安静被遗忘 2024-07-29 05:09:49

最终工作版本,涉及三个步骤

(1) dir /b /s /a .sv? > svn.lst 
(2) rar.exe a -r [archive name] . -xsvn.lst [email protected] 
(3) del svn.lst

The final working version, three steps involved:

(1) dir /b /s /a .sv? > svn.lst 
(2) rar.exe a -r [archive name] . -xsvn.lst [email protected] 
(3) del svn.lst
探春 2024-07-29 05:09:49

使用批处理文件:

1) dir /b /s /a .sv? > svn.lst
2) for /f \"tokens=* delims=\" %%i in ('dir /s /b /a:d *svn') do (dir /b /s /q \"%i\") >> svn.lst
3) rar a [email protected] myarchive [files....]

这三行必须位于 .bat 文件中。

Using a batch file:

1) dir /b /s /a .sv? > svn.lst
2) for /f \"tokens=* delims=\" %%i in ('dir /s /b /a:d *svn') do (dir /b /s /q \"%i\") >> svn.lst
3) rar a [email protected] myarchive [files....]

These three lines has to be in a .bat file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文