Compression software with specific command line options

MountainKing

Senior member
Sep 9, 2006
268
1
81
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?
 

tynopik

Diamond Member
Aug 10, 2004
5,245
500
126
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
 

MountainKing

Senior member
Sep 9, 2006
268
1
81
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.
 

lxskllr

No Lifer
Nov 30, 2004
59,981
10,461
126
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.
 

tynopik

Diamond Member
Aug 10, 2004
5,245
500
126
Why individual file names? If archive gets corrupted, I will not lose the whole collection.

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?


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.

THIS
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
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
 
Last edited:

MountainKing

Senior member
Sep 9, 2006
268
1
81
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.
 

tynopik

Diamond Member
Aug 10, 2004
5,245
500
126
True crypt does not fit the bill as a corrupt archive would not be openable?

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 . . .
 
Last edited:

MountainKing

Senior member
Sep 9, 2006
268
1
81
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
 

tynopik

Diamond Member
Aug 10, 2004
5,245
500
126
If more people can confirm that truecrypt will be ok even if partly corrupted

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.
 

MountainKing

Senior member
Sep 9, 2006
268
1
81
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
 

lxskllr

No Lifer
Nov 30, 2004
59,981
10,461
126
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

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.
 

MountainKing

Senior member
Sep 9, 2006
268
1
81
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.

Exactly the type of post I was referring to. You are negative.