4

As the title says i want to update the file test.txt which is located in a directory called Test within a Archive called test.zip

If I run 7z.exe u test.zip test.txt if puts the file in the root directory. i.e. the folder structure looks like such after the update , meaning there is a duplicate file now. I want to update the test.txt in Test subdirectory

\test.txt
\Test\test.txt

1 Answer 1

4

Simplest solution would be to actually have the same structure of directories and files on disk as it is in the archive.

So you would have test.zip in a directory. In the same directory you would have directory test and in that directory you would put test.txt Then you would just use command

7z.exe u test.zip test\test.txt

As for specifying a target directory in the archive I don't know if it is possible.

1
  • I meant to answer this myself , but yes it turns out all you need to do is ensure that you have the same folder structure and it will update as I wanted it to.
    – RC1140
    Sep 17, 2010 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .