![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-02 08:00 |
48,037 topics / 350,122 posts / today 0 new / 48,250 members |
| DOS批处理 & 脚本技术(批处理室) » [Inquiry] How to repair a rar file from a batch process? |
| Printable Version 2,329 / 10 |
| Floor1 cranelulu | Posted 2006-09-23 23:03 |
| 初级用户 Posts 15 Credits 42 From 广东省 | |
|
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 ] |
|
| Floor2 fastslz | Posted 2006-09-24 00:55 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
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. |
|
| Floor3 cranelulu | Posted 2006-09-25 21:18 |
| 初级用户 Posts 15 Credits 42 From 广东省 | |
|
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.
|
|
| Floor4 fastslz | Posted 2006-09-28 22:06 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
start /min "C:\Program Files\WinRAR\rar.exe" r -inul buggy.rar
|
|
| Floor5 cranelulu | Posted 2006-09-28 23:14 |
| 初级用户 Posts 15 Credits 42 From 广东省 | |
|
May I ask the person above.. How is this used?
|
|
| Floor6 cranelulu | Posted 2006-09-30 21:58 |
| 初级用户 Posts 15 Credits 42 From 广东省 | |
|
Where are the experts... This problem has puzzled me for a long time... Please help... Thank you thank you
|
|
| Floor7 cranelulu | Posted 2006-09-30 23:13 |
| 初级用户 Posts 15 Credits 42 From 广东省 | |
|
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 ] |
|
| Floor8 不得不爱 | Posted 2006-10-01 04:31 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
───────────────── 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 ] |
|
| Floor9 fastslz | Posted 2006-10-01 11:11 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
Originally posted by cranelulu at 2006-9-28 23:14: 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 |
|
| Floor10 3742668 | Posted 2006-10-01 11:14 |
| 荣誉版主 Posts 718 Credits 2,013 | |
|
Two old guys, it seems we need to communicate. There are 3 version operations in one post...
|
|
| Floor11 namejm | Posted 2006-10-01 11:37 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
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 ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |