redirecting output and encyption

  • Marty

    Marty - 2013-09-25

    I've been able to script 7zip to archive a files or directory. I can get it to password the archive, but I'm struggling with getting the archive to a set directory and encrypting it.
    Has anyone done this and would you be willing to share an example?

  • fernando

    fernando - 2013-09-25
    7z a archive -pPASSWORD x:\directory

    show your command line

  • Marty

    Marty - 2013-09-25

    Thank you. That's one variant I had tried but got the following result. I have full right access to both directories.

    C:\Program Files\7-Zip>7z a archive G:\Favorites* g:\test\ -pPASSWORD
    7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
    Creating archive archive.7z

    7-Zip cannot open file
    Access is denied.

    System error:
    Unspecified error

  • fernando

    fernando - 2013-09-25

    There are three directories involved.

    The error indicates that the user can not
    write to the directory "C:\Program Files\7-Zip";
    where the file archive.7z is to be created.

    Either repeat same from an elevated command prompt
    or create the archive in a different directory which
    the user does have write privileges.


    7z a g:\archive  g:\favorites\* g:\test\ -pPASSWORD

Log in to post a comment.