Compression software with specific command line options

Discussion in 'Software for Windows' started by MountainKing, Nov 20, 2012.

  1. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    Hi guys. I have a very specific need and it concerns a compression software with command line capabilities.
    The following is needed:
    - Ability to look in multiple directories a file extension. In my case, my images stored in my pictures for common pics and one or 2 different folders for private pics.
    - Ability to compress the files individually with the same password.
    - If possible use random file names when generating files.

    I have tried arj, winrar command line, 7-zip so far but have not found what I am looking for. Either I did not do it properly or these programs do not offer these options. Any software I could try or any particular commands I could try with say winrar?
     
  2. tynopik

    tynopik Diamond Member

    Joined:
    Aug 10, 2004
    Messages:
    3,806
    Likes Received:
    2
    you may want to write your own program to do stuff like generating a random file name (why?) and then call the program with the correct parameters
     
  3. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    why? Cameras use default naming schemes "img" "dsc" etc and if someone gets access to the PC, it would be obvious wildcards to look for including "jpg" etc.
     
  4. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    Why individual file names? If archive gets corrupted, I will not lose the whole collection.
     
  5. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,400
    Likes Received:
    38
    I think you're looking in the wrong place. It sounds like you want it for very dubious security purposes, and not compression. What you really need is encryption software; perhaps TrueCrypt.
     
  6. tynopik

    tynopik Diamond Member

    Joined:
    Aug 10, 2004
    Messages:
    3,806
    Likes Received:
    2
    as long as you're not using solid compression, any corruption of an archive should only impact those files that are hit directly, you should still be able to extract the rest just fine

    again, why use compression in the first place? you're not saving any space. perhaps just a file-renaming scheme?


    THIS
     
  7. Gooberlx2

    Gooberlx2 Lifer

    Joined:
    May 4, 2001
    Messages:
    15,371
    Likes Received:
    1
    Is this for backup or something? I agree truecrypt makes the most sense if you're trying to protect these for security.

    In any case, consider writing a script.

    I'd probably use cygwin since I'm more familiar with bash scripting, but between find, 7zip (7za) and other utils it should be easy.

    something like:
    Code:
    
    find /path/to/dir -type f -iname *.ext -exec sh /path/to/script.sh {} \;
    
    ==============
    #!/bin/bash
    #script.sh
    file=$1
    basename=`basename "$file"`
    dir=`dirname "$file"`
    fileName=`date | sha256sum | head -c32`
    zipFile="$fileName.7z"
    password="Password"
    
    echo "compressing $file to $zipFile"
    cd "$dir"
    7za a $zipFile $basename -p$password -mhe
    
    
    
     
    #7 Gooberlx2, Nov 21, 2012
    Last edited: Nov 21, 2012
  8. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    Ok, Its not about compression. Its about backup and storage. True crypt does not fit the bill as a corrupt archive would not be openable?
    Individual files names do not matter if I'm not using solid compression. So its all good as I will be using store anyways. I can set the file name no problem on a single archive. On multiple files it would have been close to impossible. Thanks for the input. Ill post what I can find.
     
  9. tynopik

    tynopik Diamond Member

    Joined:
    Aug 10, 2004
    Messages:
    3,806
    Likes Received:
    2
    generally speaking, I don't think a truecrypt container is much more vulnerable to corruption than a regular hard drive.

    if there was corruption, it would just affect the particular files it hit, just like a regular filesystem

    for the corruption to prevent the container from being mounted at all, it would have to be fairly unlucky and hit the partition/directory structure . . . just like on a regular drive

    now if you're concerned about files being found/noticed at all, you probably need to think more about the software side.

    what program do you use to create/view images and does it have a history? do they show up in recent documents? do websites show in history?

    in general I think these sorts of things are far more likely to cause you grief . . .
     
    #9 tynopik, Nov 22, 2012
    Last edited: Nov 22, 2012
  10. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    Thank you guys for the constructive criticism. Well not everyone. If more people can confirm that truecrypt will be ok even if partly corrupted, I will go that route. Don't need to fiddle with arcane command lines. A simple batch file will do
     
  11. tynopik

    tynopik Diamond Member

    Joined:
    Aug 10, 2004
    Messages:
    3,806
    Likes Received:
    2
    It has to be

    People have containers that are hundreds of gigabytes large, it doesn't read the entire archive when mounting. If there was corruption in the middle of the container, it would have no way of knowing until you actually tried to access the file there.
     
  12. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    Awesome. Thanks close thread. Next time when someone is trying to get help and some of you don't feel like helping please spare me the negative unconstructive remarks. Cheers
     
  13. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,400
    Likes Received:
    38
    There wasn't a single nonconstructive post in this thread. Also, AT isn't your personal help desk. It's a discussion forum where people come to learn and instruct. If you want professional support, there's plenty of people that will take your money to give it.
     
  14. MountainKing

    MountainKing Senior member

    Joined:
    Sep 9, 2006
    Messages:
    247
    Likes Received:
    0
    Exactly the type of post I was referring to. You are negative.