Menu

7zg.exe command : how to exlude root folder ?

zomurn
2011-12-19
2012-12-07
  • zomurn

    zomurn - 2011-12-19

    Hello,

    I run the command line version of 7-zip.
    How do I need to do so as the following archive :

    Suppose I have the explorer tree :

    C:\folderA\folderB\fileA.txt
    C:\folderA\folderB\fileB.txt

    Through windows command line I do :

    > cd c:\folderA
    C:\folderA > 7zg.exe a test.zip folderB\*.*

    I was expected that the content of my resulted archive will be *only* fileA.txt and fileB.txt. And is was not, it was folderB/fileA.txt and folderB/fileB.txt.
    I don't want my folderB in the archive….how to remove it ?

    In one word, I'am looking for "-j" option of the zip command under linux …. which it is ?

    Thanks

     
  • zomurn

    zomurn - 2011-12-19

    For the community,

    Here is the trick ;) :

    The right command to enter for this result IS NOT :

    C:\folderA > 7zg.exe a test.zip folderB\*.*

    BUT :

    C:\folderA > 7zg.exe a test.zip .\folderB\*.*

    OR similarly :

    C:\folderA > 7zg.exe a test.zip .\folderB\*

    Thanks anyway !

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.