Adding Files to an Existing .RAR Archive Without Prompt

I'm trying to add files to an existing, named RAr file using this command:

Copy "MyFile.ext" ARCHIVE=.rar CREATEFOLDER="MyRArFile.rar" WHENEXISTS=replace,merge HERE

... yet I get prompted whether I want to replace MyRArFile.rar or merge the new file each time the command runs.

I thought perhaps I had the syntax wrong and it should be WHENEXISTS=merge — but after looking back at the manual, I believe the above is correct.

Maybe I shouldn't be using CREATEFOLDER?

Am I missing something obvious?

1 Like

Your command looks correct. I see the same thing.

I need to look at the code but I suspect the Archives plugin is not respecting the flag to tell it not to prompt. Should be able to fix it, in any case.

Thanks for letting us know!

1 Like

I feel less crazy now!

Thanks, @Leo!

1 Like

(I looped back and tagged this bug-report, but if need to post a proper bug report somewhere or provide more feedback, just say the word.)

CC: @leo

No need to do anything extra. It's on our list.

Try

Copy "MyFile.ext" TO="MyRArFile.rar"

Hi, @lxp

In a short test case, this seems to just copy MyFile.ext as itself to the destination. Even if I've already created a MyRArFile.rar to "catch" it, MyFile.ext just ends up as a sibling alongside MyRArFile.rar, not merged into it.

Pulling back, I'm trying to do this as part of a script, where I'm using a foreach loop to make the .RAr if it doesn't already exist or add to it if it does on each loop. That way, if I don't enter the loop, I don't have an extraneous .RAr file I created at the beginning. (Though I guess I could put some conditions on creating it — or delete it at the end if it's unnecessary.)

Try checking RAR in Preferences / Zip & Other Archives / Archive and VFS Plugins