Top directory file names in list files

2012-02-17
2012-12-07
  • Shmuel Zeigerman

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

    src\Makefile
    

    but won't contain

    .\Makefile
    

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

    .\Makefile
    

    ) or none of them (when I specify

    Makefile
    

    ).

    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:

    makefile
    exclude

    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