|
cranelulu
初级用户
 
积分 42
发帖 15
注册 2006-9-10 来自 广东省
状态 离线
|
『楼 主』:
[请教]如何从批处理中修复rar文件?
使用 LLM 解释/回答一下
哪个高人可以帮个忙,怎么样才能在批处理中实现修复损坏的压缩包(rar)文件的功能.
不胜感激..
————————————俺是分割线——————————————
*********************************
版务记录
*********************************
操作: 更改标题
原因: 原格式不符版规
原标题: 求救...不知道批处理能不能做得到..
执行: 3742668
处罚: 初犯,赦之。
备注: 1.建议发贴前看看置顶版规
2.如何更改标题?
点击所发贴右下角的
编辑按钮,然后进行编辑。
3. DOS批處理 & 腳本技術
(批處理室)版规(草稿)
**********************************
Last edited by qwe1234567 on 2006-10-1 at 04:34 ]
Which expert can help? How can we implement the function of repairing damaged RAR archive files in batch processing? Thanks a lot..
————————————I am the divider——————————————
*********************************
Board affairs record
*********************************
Operation: Change title
Reason: Original format does not conform to forum rules
Original title: Help... I don't know if batch processing can do it..
Execution: 3742668
Punishment: First offense, forgiven.
Remarks: 1. It is recommended to read the sticky forum rules before posting
2. How to change the title?
Click the Edit button at the bottom right corner of the posted thread, then edit it.
3. DOS batch processing & script technology
(Batch processing room) Forum rules (draft)
**********************************
Last edited by qwe1234567 on 2006-10-1 at 04:34 ]
|
|
2006-9-23 23:03 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
r 修复压缩文件。压缩文件修复是在两阶段中完成的。首先,在损坏的压缩
文件中查找恢复记录(参照'rr'命令)。如果压缩文件包含恢复记录,并且
损坏数据部分是连续的,而且少于N*512字节(N 处是放入压缩文件恢复块
的数字),则成功恢复压缩文件的机会非常高。当这个阶段完成,一个新的
压缩文件将被创建,名为_RECOVER.RAR。
如果损坏的压缩文件不包含恢复记录或如果压缩文件没有完全恢复导致大
的损伤,将执行第二阶段。这一阶段期间只重建压缩文件的结构,而不可
能恢复 CRC 校验失败的文件。它仍然可能恢复未受损的文件,因文件结
构破坏。这对于非固实压缩文件通常有用。
当第二阶段完成,重建结构的压缩文件将被保存为 rebuilt.arcname.rar,
'arcname' 的位置是原始压缩文件名。
RAR/DOS32 版本使用 _recover.rar 和 _reconst.rar 而不是上面提及的
名字。
在恢复记录进行中,当发现可疑文件时,RAR 可以提示用户。
可疑项目
名字: <可能的文件名>
大小: <大小> 压缩后: <压缩后大小>
添加它: 是/否/全部
回答'y'来把这个项目添加到文件 _RECOVER.RAR 中。
例子:
rar r buggy.rar
rc 使用恢复卷(.rev 文件)重建丢失的卷。你需要指定任何已存在的卷作为
压缩文件名,例如,'rar rc backup.part03.rar'
读取 'rv' 命令描述得到关于恢复卷的信息。
r Repair damaged archive. Archive repair is done in two phases. First, it searches for recovery records in the damaged archive (refer to the 'rr' command). If the archive contains recovery records, and the damaged data part is contiguous and less than N*512 bytes (where N is the number of recovery blocks placed in the archive), the chance of successfully repairing the archive is very high. When this phase is completed, a new archive will be created, named _RECOVER.RAR.
If the damaged archive does not contain recovery records or if the archive is not fully repaired resulting in major damage, the second phase will be executed. During this phase, only the structure of the archive is reconstructed, and it is impossible to recover files with CRC errors. It may still recover undamaged files due to structural corruption. This is usually useful for non-solid archives.
When the second phase is completed, the reconstructed archive will be saved as rebuilt.arcname.rar, where 'arcname' is the original archive name.
RAR/DOS32 versions use _recover.rar and _reconst.rar instead of the names mentioned above.
During the recovery record process, RAR can prompt the user when suspicious files are found.
Suspicious item
Name: <possible file name>
Size: <size> Compressed: <compressed size>
Add it: yes/no/all
Answer 'y' to add this item to the file _RECOVER.RAR.
Example:
rar r buggy.rar
rc Rebuild missing volumes using recovery volumes (.rev files). You need to specify any existing volume as the archive name, for example, 'rar rc backup.part03.rar'
Read the 'rv' command description for information about recovery volumes.
|

第一高手 第二高手
我的小站
 |
|
2006-9-24 00:55 |
|
|
cranelulu
初级用户
 
积分 42
发帖 15
注册 2006-9-10 来自 广东省
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
谢谢楼上的朋友,上面你提到的修复方法我在网上也搜索过,也了解一些.但我只想通过批处理在后台自动运行来完成修复的动作,不知道能不能实现,
Thanks to the friend above, I have also searched for the repair method you mentioned above on the Internet and have some understanding. But I just want to complete the repair action through batch processing running automatically in the background. I wonder if it can be realized.
|
|
2006-9-25 21:18 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
start /min "C:\Program Files\WinRAR\rar.exe" r -inul buggy.rar
start /min "C:\Program Files\WinRAR\rar.exe" r -inul buggy.rar
|

第一高手 第二高手
我的小站
 |
|
2006-9-28 22:06 |
|
|
cranelulu
初级用户
 
积分 42
发帖 15
注册 2006-9-10 来自 广东省
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
请问楼上的..这句话怎么用啊.
May I ask the person above.. How is this used?
|
|
2006-9-28 23:14 |
|
|
cranelulu
初级用户
 
积分 42
发帖 15
注册 2006-9-10 来自 广东省
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
高人在哪啊...这个问题困惑我好久了...帮帮忙吧...谢谢了谢谢了
Where are the experts... This problem has puzzled me for a long time... Please help... Thank you thank you
|
|
2006-9-30 21:58 |
|
|
cranelulu
初级用户
 
积分 42
发帖 15
注册 2006-9-10 来自 广东省
状态 离线
|
『第 7 楼』:
[提问]网上找到的代码..哪位能帮个忙...写个修复RAR的批处理.
使用 LLM 解释/回答一下
我在网上找到的代码..可我写不出个批处理啊...哪位能帮个忙...写个修复RAR的批处理.
在安装 WinRAR 后你会发现,在相同目录中有个文件 rar.exe。它也是 32 位 RAR 的 Windows
版本,但它只支持命令行,纯文本模式的界面。当从 DOS 提示符模式下的 BAT 和 CMD 文件来调用控制 RAR 等时,它特别有用。它支持了与比 WinRAR 多很多得命令行参数开关和命令,虽然它有着常规命令行 WinRAR 命令行界面 相似的语法,但却是个真正的 RAR 控制台程序。此帮助文件不包含那一些仅在控制台版本中所支持的开关参数和命令的描述。你可以读取 rar.txt 文件来获取所有控制台 RAR 功能的详细帮助。
用法: rar <命令> -<开关 1> -<开关 N> <压缩文件> <文件...>
<@列表文件...> <解压路径\>
<命令>
a 添加文件到压缩文件
c 添加压缩文件注释
cf 添加文件注释
cw 写入压缩文件注释到文件
d 删除压缩文件中的文件
e 解压压缩文件到当前目录
f 刷新压缩文件中的文件
i=<串> 在压缩文件中查找字符串
k 锁定压缩文件
l 列出压缩文件
m 移动到压缩文件
p 打印文件到标准输出设备
r 修复压缩文件
rc 重建丢失的卷
rr 添加数据恢复记录
rv 创建恢复卷
s 转换压缩文件为自解压格式或转换回压缩文件
t 测试压缩文件
u 更新压缩文件中的文件
v 详细列出压缩文件
x 用绝对路径解压文件
<开关>
- 停止扫描
ac 压缩或解压后清除文件属性
ad 添加压缩文件名到目标路径
ag 使用当前日期生成压缩文件名
ao 添加具有压缩属性的文件
ap<格式> 添加路径到压缩文件中
as 同步压缩文件内容
av 添加用户身份校验(仅注册版本可用)
av- 禁用用户身份校验
c- 禁用注释显示
cfg- 禁用读取配置
cl 名称转换为小写
cu 名称转换为大写
df 压缩后删除文件
dh 打开共享文件
ds 对固实压缩文件禁用名称排序
e<属性> 设置文件排除属性
ed 不添加空目录
en 不添加"压缩文件结束"标志
ep 从名称中排除路径
ep1 从名称中排除基本目录
ep2 展开为完整路径
f 刷新文件
hp 同时加密文件数据和文件头
idp 禁用百分比显示
ieml 用 E-mail 发送压缩文件
ierr 发送所有消息到标准错误设备
ilog 把错误写到日志文件(只有注册版本可用)
inul 禁用所有消息
ioff 完成一个操作后关闭 PC 电源
isnd 启用声音
k 锁定压缩文件
kb 保留损坏的已解压文件
m<0..5> 设置压缩级别(0-存储...3-默认...5-最大)
mc<参数> 设置高级压缩参数
md<大小> 以KB为单位的字典大小(64,128,256,512,1024,2048,4096 or A-G)
ms 指定存储的文件类型
o+ 覆盖已存在文件
o- 不覆盖已存在文件
os 保存 NTFS 流
ow 保存或恢复文件所有者和组
p 设置密码
p- 不询问密码
r 递归子目录
r0 仅递归通配符名称的子目录
Last edited by cranelulu on 2006-10-1 at 00:01 ]
The code I found online.. but I can't write a batch script... Can anyone help... Write a batch script to repair RAR.
After installing WinRAR, you will find a file rar.exe in the same directory. It is also the Windows version of 32-bit RAR, but it only supports the command line, a text-mode interface. It is especially useful when calling and controlling RAR and so on from BAT and CMD files in the DOS prompt mode. It supports many more command-line parameter switches and commands than WinRAR. Although it has a similar syntax to the conventional command-line WinRAR command-line interface, it is a real RAR console program. This help file does not contain descriptions of those switch parameters and commands supported only in the console version. You can read the rar.txt file to get detailed help on all console RAR functions.
Usage: rar <command> -<switch 1> -<switch N> <archive file> <file...>
<@list files...> <extract path\>
<command>
a Add files to archive
c Add archive comment
cf Add file comment
cw Write archive comment to file
d Delete files from archive
e Extract files to current directory
f Refresh files in archive
i=<string> Find string in archive
k Lock archive
l List archive
m Move to archive
p Print file to standard output device
r Repair archive
rc Rebuild missing volumes
rr Add data recovery records
rv Create recovery volumes
s Convert archive to self-extracting format or convert back to archive
t Test archive
u Update files in archive
v List archive in detail
x Extract files with absolute path
<switch>
- Stop scanning
ac Clear file attributes after compression or extraction
ad Add archive name to target path
ag Generate archive name using current date
ao Add files with archive attributes
ap<format> Add path to archive
as Synchronize archive contents
av Add user verification (available only in registered version)
av- Disable user verification
c- Disable comment display
cfg- Disable reading configuration
cl Convert names to lowercase
cu Convert names to uppercase
df Delete files after compression
dh Open shared files
ds Disable name sorting for solid archives
e<attribute> Set file exclusion attribute
ed Do not add empty directories
en Do not add "archive end" flag
ep Exclude path from name
ep1 Exclude base directory from name
ep2 Expand to full path
f Refresh files
hp Encrypt both file data and file header
idp Disable percentage display
ieml Send archive via E-mail
ierr Send all messages to standard error device
ilog Write errors to log file (available only in registered version)
inul Disable all messages
ioff Turn off PC power after one operation
isnd Enable sound
k Lock archive
kb Keep damaged extracted files
m<0..5> Set compression level (0=store...3=default...5=maximum)
mc<parameter> Set advanced compression parameters
md<size> Dictionary size in KB (64, 128, 256, 512, 1024, 2048, 4096 or A-G)
ms Specify file types to store
o+ Overwrite existing files
o- Do not overwrite existing files
os Save NTFS streams
ow Save or restore file owner and group
p Set password
p- Do not ask for password
r Recurse subdirectories
r0 Recurse only subdirectories with wildcard names
Last edited by cranelulu on 2006-10-1 at 00:01 ]
|
|
2006-9-30 23:13 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
───────────────── 版务记录 ─────────────────
执行:qwe1234567
说明:原主题 {网上找到的代码..哪位能帮个忙...写个修复RAR的批处理}与 {如何从批处理中修复rar文件} 存在上下文关系
提示:请不要吧同样的问题发几个主题,这样不利于管理、不利于回贴!
操作:合并主题、并且删除原 {如何从批处理中修复rar文件} 里7楼cranelulu所发的相同内容的帖子!
处罚:扣除因为多发主题多得的4分
───────────────── 版务记录 ─────────────────
Last edited by qwe1234567 on 2006-10-1 at 04:42 ]
───────────────── Moderation Record ─────────────────
Performed by: qwe1234567
Description: The original threads { Code found online.. Can someone help... Write a batch script to repair RAR} and { How to repair RAR files from a batch script} have a contextual relationship
Tip: Please do not post the same question in several threads, as it is not conducive to management and replying!
Action: Merge the threads and delete the post with the same content posted by cranelulu on floor 7 in the original { How to repair RAR files from a batch script}!
Punishment: Deduct 4 points for the extra points obtained from posting multiple threads
───────────────── Moderation Record ─────────────────
Last edited by qwe1234567 on 2006-10-1 at 04:42 ]
|

我的网络U盘 我的网络第2个U盘
论坛软件下载链接
灵雨飘零论坛
论坛新手必读,所有人的基本行为准则
刷QQ空间人气、留言的小软件 |
|
2006-10-1 04:31 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Originally posted by cranelulu at 2006-9-28 23:14:
请问楼上的..这句话怎么用啊.
在批处理中.bat或.cmd用....
@echo off
path=%path%;C:\Program Files\WinRAR;
start /min rar.exe r -inul 这里是你需要修复的rar文件名
Originally posted by cranelulu at 2006-9-28 23:14:
How to use this sentence above?
In batch processing, for .bat or .cmd, use....
@echo off
path=%path%;C:\Program Files\WinRAR;
start /min rar.exe r -inul Here is the name of the RAR file you need to repair
|

第一高手 第二高手
我的小站
 |
|
2006-10-1 11:11 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
两位老斑,看来需要沟通啊,一个贴出现了3次 版务操作...
Two old guys, it seems we need to communicate. There are 3 version operations in one post...
|
|
2006-10-1 11:14 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
嘿嘿,那是qwe1234567从另外一个主题中合并过来的,所以会这样。已经把我那条版务记录删除了。
刚上任不久,我还得熟悉一下论坛的管理操作才行,望各位多多包涵。
Last edited by namejm on 2006-10-1 at 11:40 ]
Hehe, that was merged from another topic by qwe1234567, so it's like that. I've already deleted my moderation record.
Just took office not long ago, and I still need to get familiar with the forum management operations. Please bear with me.
Last edited by namejm on 2006-10-1 at 11:40 ]
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-10-1 11:37 |
|