7Za - How I get Directories Information back

Help
2004-12-01
2012-12-07
  • Hello to everybody,

    I use 7Za.exe version 4.12b and I like it. But I have a little problem.

    I want archiv these Directories in one Archivfile.
    C:\temp\Data1  with  Test1.Txt in it and
    C:\temp\Data2  with  Test2.Txt and another SubDir \Data22 in it.

    I use a Listfile c:\temp\Pack.Lst as follow
    C:\temp\Data1\*
    C:\temp\Data2\*

    My commandline code make the archivfile:
    7za.exe A c:\temp\compress\Output @Pack.Lst
    That works fine.

    If I extract my archivfile with fullpaths, I get the files and subdirectories back.
    7za.exe X c:\temp\compress\Output.7z oc:\temp\decompre

    But I dont get the Directories \Data1 and \Data2 back.

    Can somebody help me, how I get the Directory Path back too. Cause, if the directorys have files with identical names, I think, Ive got a big problem.

    Many Thanks for youre help.

     
    • Igor Pavlov
      Igor Pavlov
      2004-12-01

      try this:
      C:\temp\Data1
      C:\temp\Data2

       
    • is there anyway to get full directory path

      ie: compress c:\mydocs\school\papers\ and when it decompresses to c:\temp\mydocs\school\papers

      is there anyway of doing that?

       
    • I want archiv these Directories in one Archivfile.
      C:\temp\Data1 with Test1.Txt and other files in it and
      C:\temp\Data2 with Test1.Txt and other files.

      I hope to archive those files named Test1.txt in 2 directories,
      I use a Listfile c:\temp\Pack.Lst as follow
      C:\temp\Data1\Test1.txt
      C:\temp\Data2\Test1.txt

      My commandline code make the archivfile:
      7za.exe A c:\temp\compress\Output @Pack.Lst
      That can't work.

      Coz 7za.exe put those 2 files at same (root) level,
      so I get a wrong message.

      If I modify the Listfile c:\temp\Pack.Lst as follow
      C:\temp\Data1\ C:\temp\Data2\

      My commandline code make the archivfile:
      7za.exe A c:\temp\compress\Output @Pack.Lst
      It archive all files in those 2 directories.
      But I don't want those files, I just need Test1.txt,
      How can I do?

       
      • Igor Pavlov
        Igor Pavlov
        2004-12-22

        Now 7-zip has no such switch, but there is one trick:
        C:\temp\Data1*\Test1.txt
        C:\temp\Data2*\Test1.txt

         
    • Thanks to Igor Pavlov,
      I'll try it.

      Thankx!!

       
    • Really apreciate it, Pavlov.

      Mac