Top directory file names in list files

  • Shmuel Zeigerman

    I use the command-line version. I'd like that my archive will contain


    but won't contain


    (top-level Makefile). It is my impression that it is not possible with an exclude list: either both files are included (when I specify


    ) or none of them (when I specify



    Is my impression wrong, and if it is, how to achieve the required result?

  • fernando

    fernando - 2012-02-17

    from top-level directory try like

    7z a archive * -x!makefile

  • Shmuel Zeigerman

    Thank you, it worked. But "Makefile" was just an example. Imagine we have 100 files with identical names in top directory and some subdirectory. It would be very inconvenient (or impossible) to specify them all on the command line. This is what list files are for.

  • fernando

    fernando - 2012-02-18

    from top-level directory try like:

    7z a archive * -x@exclude

    content of exclude file:


    of course if exclude file is not located in top-level directory there is no need to list in self.

  • Shmuel Zeigerman

    Thanks, this really helps! I had -xr@exclude and that was the reason of failure.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks