Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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 '10 at 7:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.