How to Auto RaR Files

Status
Not open for further replies.
Here is my code...

Code:
@ECHO OFF

for /D %%f in ("C:\Users\Administrator\Downloads\NA\a\*") do copy "C:\Readme.txt" "%%f\"

cd C:\Users\Administrator\Downloads\NA\a

SET PATH=C:\Program Files\WinRAR;%PATH%

FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep "C:\Users\Administrator\Downloads\NA\a\%%~nxd.rar" "%%~fd" 

EXIT


SET PATH=C:\Program Files\WinRAR;%PATH% i m using this path.. and its working ...

NOw please edit the code accordingly..
Thanks :)

---------- Post added at 09:40 PM ---------- Previous post was at 04:14 PM ----------

And same way.. can you provide us the auto-extract files with password protected.. and remove them after extracting..

Thanks in advance :)

---------- Post added 23rd May 2012 at 01:01 AM ---------- Previous post was 22nd May 2012 at 09:40 PM ----------

Bro, Its working...after making different folder...

But is it possible .. to add readme.txt file..

without making too many folders..

Means I have one main folder... in which files to be compressed.

in that folder i have to make separate folder ....thta's tiry job.

ANy Solution ??
 
you should really try trial and error so u learn :P

ECHO OFF

cd C:\PATH TO RARS
SET PATH=C:\Program Files\WinRAR;%PATH%

FOR /f "delims=" %%d IN ('DIR /B') DO unRaR e -p123456 *.rar C:\DESTINATION TO EXTRACT

EXIT

123456 is the password
 
Hey, bro....

is it possible to do same thing - auto splitting using FFSJ or HJSplit ??

---------- Post added at 05:40 PM ---------- Previous post was at 05:40 PM ----------

If yes, then please provide us the BAT file :)
 
I have kindly provided this tutorial using a bat code for WinRaR, not FFSJ nor HJSplit.

Thats another tutorial.

I strongly recomend you try learning to use your curiosity, research and apply trial and error, you will learn much more than getting it done by someone else.
 
readme.txt not work.
@ECHO OFF

for /D %%f in ("C:\testin\ *") do copy "C:\readme\readme.txt" "%%f\"

cd C:\testin

SET PATH=C:;C:\Program Files\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m3 -ep -v500m -x*.rar "C:\testout\%%~nxd.rar" "%%~fd"

EXIT

it compression file without folder. it compression file in folder only? how to compression with folder.
 
Last edited:
There is a problem in this code.
If there is a folder within a folder,it will merge them in one rar file.
e.g; 'A' folder contains two subfolders '1' and '2'. It will merge 1 and 2 folders files in one rar file.
 
Heres my code for on my VPS

it creates Archives and locks them so you can continue to run the .bat and it will only create new archives as by "Locking" an archive, no more modification can become of it

It uses "Store" compression and runs in the background, as well.

Splits in 1GB files.

Code:
@ECHO OFF

 cd C:\Users\Administrator\Desktop\[INSTERT YOUR OWN FOLDER NAME HERE]

 SET PATH=C:;C:\Program Files (x86)\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

 FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR A -m0 -x*.rar -v1g -o- -k -- "C:\Users\Administrator\Desktop\[INSTERT YOUR OWN FOLDER NAME HERE]\%%~nxd.rar" "%%~fd"

Exit
 
Last edited:
There is a problem in this code.
If there is a folder within a folder,it will merge them in one rar file.
e.g; 'A' folder contains two subfolders '1' and '2'. It will merge 1 and 2 folders files in one rar file.

add schalte
-ep1 -r

Code:
FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep1 -r "C:\rar\%%~nxd.rar" "%%~fd"
here including files will be added including files and all subdirectories working directory
 
add schalte
-ep1 -r

Could you tell me where to add ?
PHP:
@ECHO OFF

for /D %%f in ("H:\Downloads\Music\*") do copy "H:\Downloads\test\readme\" "%%f\"

cd H:\Downloads\Music

SET PATH=C:;C:\Program Files\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%

FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df "H:\Downloads\test\2\%%~nxd.rar" "%%~fd"

EXIT
 
add here

@ECHO OFF
for /D %%f in ("H:\Downloads\Music\*") do copy "H:\Downloads\test\readme\" "%%f\"
cd H:\Downloads\Music
SET PATH=C:;C:\Program Files\WinRAR;C:\Windows\system32;C:\Windows;C:\Win dows\System32\Wbem;%PATH%
FOR /f "delims=" %%d IN ('DIR /B') DO WinRAR a -m0 -ep -df -ep1 -r "H:\Downloads\test\2\%%~nxd.rar" "%%~fd"
EXIT
 
Status
Not open for further replies.
Back
Top