# [SOLVED] WinRAR command-line Bad Archive



## OneFourOne (Dec 23, 2010)

Hello,

I am trying to set up a .bat file to add a minecraft mod to minecraft.jar


```
set path="C:\Program Files\WinRAR\";%path%
cd desktop
rename minecraft.jar minecraft.rar
rar a minecraft.rar mod1.class
rename minecraft.rar minecraft.jar
pause
```
I don't understand why this isn't working, when this line is called

```
rar a minecraft.rar mod1.class
```
 an error is displayed stating that minecraft.rar is a bad archive.

How can I fix this?

Thanks,

JPiiONEFOURONE


----------



## OneFourOne (Dec 23, 2010)

I found out I can use the following code to do this.


```
jar uf minecraft.jar mod1.class
```


----------

