Go Back   AnandTech Forums > Software > Software for Windows

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2014
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 11-20-2012, 10:59 PM   #1
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default Compression software with specific command line options

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?
SuLyMaN is offline   Reply With Quote
Old 11-21-2012, 02:13 AM   #2
tynopik
Platinum Member
 
Join Date: Aug 2004
Posts: 2,493
Default

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
tynopik is online now   Reply With Quote
Old 11-21-2012, 02:57 AM   #3
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default

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.
SuLyMaN is offline   Reply With Quote
Old 11-21-2012, 02:58 AM   #4
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default

Why individual file names? If archive gets corrupted, I will not lose the whole collection.
SuLyMaN is offline   Reply With Quote
Old 11-21-2012, 07:30 AM   #5
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 38,085
Default

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.
lxskllr is offline   Reply With Quote
Old 11-21-2012, 11:08 AM   #6
tynopik
Platinum Member
 
Join Date: Aug 2004
Posts: 2,493
Default

Quote:
Originally Posted by SuLyMaN View Post
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?


Quote:
Originally Posted by lxskllr View Post
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
tynopik is online now   Reply With Quote
Old 11-21-2012, 01:02 PM   #7
Gooberlx2
Lifer
 
Gooberlx2's Avatar
 
Join Date: May 2001
Location: Denver, CO
Posts: 14,752
Default

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 by Gooberlx2; 11-21-2012 at 01:27 PM.
Gooberlx2 is offline   Reply With Quote
Old 11-22-2012, 12:59 AM   #8
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default

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.
SuLyMaN is offline   Reply With Quote
Old 11-22-2012, 08:45 PM   #9
tynopik
Platinum Member
 
Join Date: Aug 2004
Posts: 2,493
Default

Quote:
Originally Posted by SuLyMaN View Post
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 by tynopik; 11-22-2012 at 08:47 PM.
tynopik is online now   Reply With Quote
Old 11-23-2012, 02:38 AM   #10
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default

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
SuLyMaN is offline   Reply With Quote
Old 11-23-2012, 06:43 AM   #11
tynopik
Platinum Member
 
Join Date: Aug 2004
Posts: 2,493
Default

Quote:
Originally Posted by SuLyMaN View Post
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.
tynopik is online now   Reply With Quote
Old 11-23-2012, 07:58 AM   #12
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default

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
SuLyMaN is offline   Reply With Quote
Old 11-23-2012, 08:05 AM   #13
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 38,085
Default

Quote:
Originally Posted by SuLyMaN View Post
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.
lxskllr is offline   Reply With Quote
Old 11-23-2012, 12:16 PM   #14
SuLyMaN
Member
 
Join Date: Sep 2006
Posts: 117
Default

Quote:
Originally Posted by lxskllr View Post
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.
SuLyMaN is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:01 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.