Base directory for compression?

Help
Anonymous
2005-01-15
2012-12-07
  • Anonymous - 2005-01-15

    Hi,
    I want to create an automated filelist-based backup script that is called like this:
    7za a -t7z -mx=7 backup.1.7z @filelist

    The filelist looks like this:
    C:\boot.ini
    C:\Tools\adminftp.exe
    C:\Tools\base64.exe
    C:\Tools\subdir\morefiles

    Now some of the files will be compressed into the archive's root folder, some get in their correct subfolders. It seems all files from C:\ and C:\Tools are in the root folder and only the C:\Tools\subdir\* files get into the subdir\ folder of the archive. So the first two directory levels will be merged into one.

    What's going on there? Where can I set the base directory that all directory structure information will be stored relative to? I need the exact directory structure in the archive or things will be messed up.

    I'm using 7zip 4.14 beta, because 3.13 doesn't even accept absolute pathnames in the filelist, which I also need for my application.

    Hope anyone can help me.
    --Yves

     
    • Igor Pavlov

      Igor Pavlov - 2005-01-20

      The only way now. to change current folder to C:\ and use relative paths:
      boot.ini
      Tools\adminftp.exe
      Tools\base64.exe
      Tools\subdir\morefiles

       
      • Bhavbhuti Nathwani

        Hi

        But my list file contains file both from C:\ and D:\ and how do I change the directory when I am running 7z.exe from VFP?  There is no batch file to do that just a class I am using

        Please advise.

         
    • Anonymous - 2005-01-22

      Is there a chance future 7zip versions can do this with absolute pathnames? I like the 'patch' way to provide a number of directory levels to trim from the beginning as a cmdline parameter. This could work with relatively little work. I could try to create a patch to the 7zip sources when I find some time for it. :)

       
      • Igor Pavlov

        Igor Pavlov - 2005-01-22

        Later. Imho now it's not most important task.

         
    • Anonymous - 2005-01-22

      Now I have another problem with it. I created a listfile with all relative paths to root and changed to the root dir before. But 7za copies all files multiple times into the archive. So the file c:\bin\abc\file can be found at these locations in the archive:
      \file
      \abc\file
      \bin\abc\file
      I consider this a bug, FYI. Hope it gets fixed in a future version.

      Also it compresses all files in an indefinite order whereas the filelist contains a sorted list of files and directories.

       
      • Igor Pavlov

        Igor Pavlov - 2005-01-22

        1) don't use -r
        2) 7-Zip resorts to increase compression ratio

         
    • Anonymous - 2005-01-22

      OK, all back. I still used "\path\file" names instead of "path\file" names. This is bad... OK, fixed now and it works fine.

       

Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks