How can I overwrite an existing file in 7zip?
I'm trying this:
7za.exe a "C:\Disc.7z" "C:\test" -v20000000b -m0=BCJ -bd
But if I already have created the file C:\Disc.7z
then 7zip doesn't compress anything and sends me this output:
System error:
File already exist.
I've tried with the switch -y
, but 7zip does not do anything...
How can I overwrite the file?
UPDATE
I've tried the switch -aoa
but it does not work either...
Your problem is that you're using -v
to create a multi-volume archive. People have been requesting the author for the last 5 years to allow the program to modify multi-volume archives, but he has no plans to implement the feature any time soon. (It's open source, wish some enterprising programmer would do it already!)
Try using 7za.exe u
instead of 7za.exe a
. The first one is specifically used to update an archive that already exists.