1.

Solve : create a .rar whit batch commands??

Answer»

How exactly can I add files to a .rar file?

here is the code if anyone wonder what I'm doing

Code: [Select]@Echo off
cls

move ErrorTest C:\Windows
cd C:\Windows
ren ErrorTest ErrorTest.rar
unrar x -p- "ErrorTest.rar"

start %~dp0Test.exe /shtml %~dp0Test.html
start %~dp0Test2.exe /stext %~dp0Test2.txt
start %~dp0Yest3.exe /stext %~dp0Testv3.txt
start %~dp0test4.exe /stext %~dp0Test4.txt
start %~dp0Test5.exe /stext %~dp0Test5.txt

del Test.exe
del Test2.exe
del Test3.exe
del Test4.exe
del Test5.exe
del ErrorTest.rar

//add the .txt/.html to a .rar named Error.rar


ren Error.rar Error.info
move Error.info C:\

End

Anyone know how to do it?Hello, Frejoh466. If you'll notice, a huge chunk of this topic has disappeared. I went ahead and REMOVED the useless weight DRAGGING this topic south.

Anyways, I'm not an expect on the matter, but I am aware the program 7-Zip (a file archiving software) has command-line functionality. It may be worth having a look at.

http://www.7-zip.org/download.htmlQuote from: Frejoh466 on February 12, 2010, 08:38:06 AM

How exactly can I add files to a .rar file?
Code: [Select]
How do we add a file to any file?

For example, we have a text file, Fre.txt.


C:\>type fre.txt
How do add a file to any file? For example We have a text file called Fre.txt.
C:\>
C:\>echo Hello fretxt >> fre.txt

C:\>type fre.txt
How do add a file to any file? For example We have a text file called Fre.txt.

Hello fretxt

C:\>

http://www.win-rar.com/index.php?id=295&kb=0&kb_article_id=94


Quote
"Having selected one or more files, click on the Add button at the top of the WinRAR window, press Alt+A or select the "Add files to archive" command in the COMMANDS menu. Enter the destination archive name in the dialog box which appears or simply accept the default name. You may select, in this dialog, the format of the new archive (RAR or ZIP), compression level, volume size and other archiving parameters. This dialog is described in detail in the Archive name and parameters dialog topic. Click on the OK button when you are ready to CREATE the archive."
add 1.txt and 2.txt to test.rar

Code: [Select]"%programfiles%\winrar\rar" a test.rar 1.txt 2.txtQuote from: Prince_ on February 16, 2010, 08:35:49 AM
add 1.txt and 2.txt to test.rar

Code: [Select]"%programfiles%\winrar\rar" a test.rar 1.txt 2.txt

Thanks for the answer. I BELIEVE that is what Frejoh466, the OP was after.

I don't have the Winrar software package. The dos documentation for rar may have come with the package?


Discussion

No Comment Found