How to add files to specified folder in archive with 7zip command line











up vote
5
down vote

favorite
1












I have folders and files on my disk



C:buildsmain.exe
D:componentsatesta.exe
D:componentsbtestb.exe
D:componentsctestc.exe
D:dependenciesabc.dll


Can I create an archive with 7z command line version with folder structure similar to this?



MyArchive.7z
|- main.exe
|- abc.dll
|- componentstesta.exe
|- componentstestb.exe
|- componentstestc.exe









share|improve this question




























    up vote
    5
    down vote

    favorite
    1












    I have folders and files on my disk



    C:buildsmain.exe
    D:componentsatesta.exe
    D:componentsbtestb.exe
    D:componentsctestc.exe
    D:dependenciesabc.dll


    Can I create an archive with 7z command line version with folder structure similar to this?



    MyArchive.7z
    |- main.exe
    |- abc.dll
    |- componentstesta.exe
    |- componentstestb.exe
    |- componentstestc.exe









    share|improve this question


























      up vote
      5
      down vote

      favorite
      1









      up vote
      5
      down vote

      favorite
      1






      1





      I have folders and files on my disk



      C:buildsmain.exe
      D:componentsatesta.exe
      D:componentsbtestb.exe
      D:componentsctestc.exe
      D:dependenciesabc.dll


      Can I create an archive with 7z command line version with folder structure similar to this?



      MyArchive.7z
      |- main.exe
      |- abc.dll
      |- componentstesta.exe
      |- componentstestb.exe
      |- componentstestc.exe









      share|improve this question















      I have folders and files on my disk



      C:buildsmain.exe
      D:componentsatesta.exe
      D:componentsbtestb.exe
      D:componentsctestc.exe
      D:dependenciesabc.dll


      Can I create an archive with 7z command line version with folder structure similar to this?



      MyArchive.7z
      |- main.exe
      |- abc.dll
      |- componentstesta.exe
      |- componentstestb.exe
      |- componentstestc.exe






      windows-7 command-line archiving 7-zip






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 5 '11 at 10:57









      Siim K

      5,81463964




      5,81463964










      asked Dec 5 '11 at 8:39









      Peter PAD

      12426




      12426






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Reading this



          You would need to create a batch/script file containing something like this:



          7z a: -r -t7z MyArchive.7z C:buildsmain.exe D:componentsatesta.exe D:componentsbtestb.exe D:componentsctestc.exe D:dependenciesabc.dll


          Commands are as follows - a: to add to archive, -r to make recursive, -t7z .7z archive file type.



          Note: this is untested.






          share|improve this answer























          • I got compnentsatesta.exe instead of componentstesta.exe, guy
            – Peter PAD
            Dec 6 '11 at 0:50












          • Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
            – HaydnWVN
            Dec 6 '11 at 11:09










          • Any update on this Peter PAD? Fixed? Tested?
            – HaydnWVN
            Jan 11 '13 at 13:52











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f364724%2fhow-to-add-files-to-specified-folder-in-archive-with-7zip-command-line%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Reading this



          You would need to create a batch/script file containing something like this:



          7z a: -r -t7z MyArchive.7z C:buildsmain.exe D:componentsatesta.exe D:componentsbtestb.exe D:componentsctestc.exe D:dependenciesabc.dll


          Commands are as follows - a: to add to archive, -r to make recursive, -t7z .7z archive file type.



          Note: this is untested.






          share|improve this answer























          • I got compnentsatesta.exe instead of componentstesta.exe, guy
            – Peter PAD
            Dec 6 '11 at 0:50












          • Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
            – HaydnWVN
            Dec 6 '11 at 11:09










          • Any update on this Peter PAD? Fixed? Tested?
            – HaydnWVN
            Jan 11 '13 at 13:52















          up vote
          0
          down vote













          Reading this



          You would need to create a batch/script file containing something like this:



          7z a: -r -t7z MyArchive.7z C:buildsmain.exe D:componentsatesta.exe D:componentsbtestb.exe D:componentsctestc.exe D:dependenciesabc.dll


          Commands are as follows - a: to add to archive, -r to make recursive, -t7z .7z archive file type.



          Note: this is untested.






          share|improve this answer























          • I got compnentsatesta.exe instead of componentstesta.exe, guy
            – Peter PAD
            Dec 6 '11 at 0:50












          • Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
            – HaydnWVN
            Dec 6 '11 at 11:09










          • Any update on this Peter PAD? Fixed? Tested?
            – HaydnWVN
            Jan 11 '13 at 13:52













          up vote
          0
          down vote










          up vote
          0
          down vote









          Reading this



          You would need to create a batch/script file containing something like this:



          7z a: -r -t7z MyArchive.7z C:buildsmain.exe D:componentsatesta.exe D:componentsbtestb.exe D:componentsctestc.exe D:dependenciesabc.dll


          Commands are as follows - a: to add to archive, -r to make recursive, -t7z .7z archive file type.



          Note: this is untested.






          share|improve this answer














          Reading this



          You would need to create a batch/script file containing something like this:



          7z a: -r -t7z MyArchive.7z C:buildsmain.exe D:componentsatesta.exe D:componentsbtestb.exe D:componentsctestc.exe D:dependenciesabc.dll


          Commands are as follows - a: to add to archive, -r to make recursive, -t7z .7z archive file type.



          Note: this is untested.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 10 '13 at 19:27









          Sathya

          52.4k29153252




          52.4k29153252










          answered Dec 5 '11 at 12:11









          HaydnWVN

          3,07931844




          3,07931844












          • I got compnentsatesta.exe instead of componentstesta.exe, guy
            – Peter PAD
            Dec 6 '11 at 0:50












          • Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
            – HaydnWVN
            Dec 6 '11 at 11:09










          • Any update on this Peter PAD? Fixed? Tested?
            – HaydnWVN
            Jan 11 '13 at 13:52


















          • I got compnentsatesta.exe instead of componentstesta.exe, guy
            – Peter PAD
            Dec 6 '11 at 0:50












          • Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
            – HaydnWVN
            Dec 6 '11 at 11:09










          • Any update on this Peter PAD? Fixed? Tested?
            – HaydnWVN
            Jan 11 '13 at 13:52
















          I got compnentsatesta.exe instead of componentstesta.exe, guy
          – Peter PAD
          Dec 6 '11 at 0:50






          I got compnentsatesta.exe instead of componentstesta.exe, guy
          – Peter PAD
          Dec 6 '11 at 0:50














          Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
          – HaydnWVN
          Dec 6 '11 at 11:09




          Then ammend it to suit, does it work? If you can't figure out how to do that yourself then you're on the wrong website. Suggest reading the software FAQ and help files.
          – HaydnWVN
          Dec 6 '11 at 11:09












          Any update on this Peter PAD? Fixed? Tested?
          – HaydnWVN
          Jan 11 '13 at 13:52




          Any update on this Peter PAD? Fixed? Tested?
          – HaydnWVN
          Jan 11 '13 at 13:52


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f364724%2fhow-to-add-files-to-specified-folder-in-archive-with-7zip-command-line%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido