Menu

#432 Command line - how to keep the structure of directories?

open
nobody
None
7
2022-09-24
2022-09-24
Michael
No

Hello,

I run the following command line
"C:\Program Files\7-Zip\7z.exe" a -t7z "c:\temp\archive.7z" @listfile.txt

where "listfile.txt" contains the list of the files paths from different directories:

C:\Incoming\Pers\bin\BaseTest.mdb
C:\Incoming\Pers\bin\bin.txt
C:\Incoming\Pers\DMunit.pas
C:\Incoming\Pers\DMunit.xml
C:\Incoming\Pers\archive\JvVCLUtils.pas
C:\Incoming\Pers\archive\JvVigenereCipher.pas

After creating the "c:\temp\archive.7z" archive it contains:

BaseTest.mdb
bin.txt
DMunit.pas
DMunit.xml
JvVCLUtils.pas
JvVigenereCipher.pas

So, all the files have been saved in one folder inside the archive.
How to keep the structure of directories?
I expect the following directories to be created inside the archive:

Incoming\Pers\
Incoming\Pers\bin\
Incoming\Pers\archive\

Thank you in advance.

Discussion

  • Igor Pavlov

    Igor Pavlov - 2022-09-24

    use -spf2 switch.

     
    • Michael

      Michael - 2022-09-24

      Many thanks!!!

       

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.