COM preSS几个子与批处理文件(WIN7) [英] Compress several subfolders with batch file (win7)

查看:160
本文介绍了COM preSS几个子与批处理文件(WIN7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面就是我尝试用winrar和Windows批处理文件来实现的:

Here's what im trying to achieve using WinRar and Windows batch file:

我有这样的文件夹结构

main_folder
- SubDir
- Another_Sub_Dir
- Subdir_2 etc |Note: there are no sub-folders inside sub-folders|

archives_folder
-

在批处理我需要在 main_folder 所有子文件夹将COM pressed然后子文件夹中删除。
在COM pressed应的文件夹里面去 archives_folder

On batch run I need all sub-folders inside main_folder to be compressed and then sub-folders deleted. The compressed folders should go inside archives_folder.

推荐答案

您可以使用以下命令行:

You can use following command line:

"Path to WinRAR program files directory\Rar.exe" m -agYYYY-MM-DD_N -cfg- -ep1 -inul -m5 -mdg -r -s -tl -y "Complete Path to\archives_folder\Backup_" "Complete Path to\main_folder\"

此命令使用控制台版本 RAR.EXE WinRAR的在程序文件目录的 WinRAR的移动所有文件和子目录 main_folder 与名称的压缩文件 Backup_YYYY-MM-DD_N.rar 中目录 archives_folder

This command uses console version Rar.exe of WinRAR in program files directory of WinRAR to move all files and subdirectories in main_folder to an archive with name Backup_YYYY-MM-DD_N.rar in directory archives_folder.

YYYY-MM-DD_N 是年,月,日对在运行批处理文件超过每天一次的情况下,从1开始递增数字进行归档延长。

YYYY-MM-DD_N is year, month and day on archiving extended by an incremental number starting with 1 in case of running the batch file more than once per day.

在归档完成递归使用使用固实压缩最佳COM pression 4096 KB字典大小与父目录路径完整路径\\ main_folder \\不被归档。归档文件获取存档文件中的最新文件的时间。

The archiving is done recursively using best compression using a solid archive with 4096 KB dictionary size with parent directory path "Complete Path to\main_folder\" not being archived. The archive file gets the time of the newest file inside the archive.

有关用于可在文本文件中找到的所有开关更多细节的 Rar.txt 在程序文件目录的 WinRAR的

More details about all the switches used can be found in text file Rar.txt in program files directory of WinRAR.

这篇关于COM preSS几个子与批处理文件(WIN7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆