China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-07 19:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to batch modify RAR encrypted file names and passwords View 1,650 Replies 5
Original Poster Posted 2008-03-13 17:03 ·  中国 山东 济南 联通
高级用户
★★★
Credits 959
Posts 474
Joined 2007-10-25 10:40
18-year member
UID 100716
Gender Male
Status Offline
How to batch modify RAR encrypted file name passwords. I have more than 50 encrypted file name passwords. How to batch modify the encrypted file name passwords?
Floor 2 Posted 2008-03-13 17:48 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by 5872169 at 2008-3-13 05:03 PM:
How to batch modify RAR encrypted file name passwords? I have more than 50 encrypted file name passwords, how to batch modify the encrypted file name passwords?



It's quite possible there's no answer.............

It's difficult and requires proficiency in RAR.............
Floor 3 Posted 2008-03-16 17:24 ·  中国 四川 成都 电信
初级用户
Credits 36
Posts 14
Joined 2008-03-05 20:27
18-year member
UID 112123
Gender Male
Status Offline
It seems that only WinRAR has the function to modify the password, but you have to open them one by one, first enter the password and then use the set password function to reset a new password.

The command-line version of RAR has no function to modify the password. As a workaround, first extract the files one by one to a temporary directory, and then re-archive with a password.

Using a for statement should be able to do it easily, theory not tested!

for %%a in (*.rar) do(
rar e -pold password %%~fa d:\temp\
rar m -pnew password d:\%%a d:\temp\*.*
)
Floor 4 Posted 2008-03-17 12:26 ·  中国 山东 济南 联通
高级用户
★★★
Credits 959
Posts 474
Joined 2007-10-25 10:40
18-year member
UID 100716
Gender Male
Status Offline
Where is the password setting function? I can't find it.
Floor 5 Posted 2008-03-17 13:35 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
start "" winrar.exe -p
第一高手 第二高手

Floor 6 Posted 2008-03-17 15:46 ·  中国 山东 济南 联通
高级用户
★★★
Credits 959
Posts 474
Joined 2007-10-25 10:40
18-year member
UID 100716
Gender Male
Status Offline
fastslz, I don't understand the meaning of the code you wrote
Forum Jump: