Tool to archive in batches

Joined
Jan 24, 2008
Messages
1,200
Reaction score
340
I guess this would not be considered a black hat tool but I'm looking for something that can take single files in a folder, archive, and if needed password protect them in RAR format.

Any suggestions.
 
Hi,

You might take a look at the following page:
http://xona.com/2006/07/05g.html

Looks like you can use a include and exclude text file when archiving.

I'm not sure if you are wanting to archive the same files each time or if they will be different files each archive.

If they are the same, you could setup a Windows Task Schedule to run a bat file with the code from the above page.

Chris
 
Thanks smallstorm I'll keep this handy. The problem I have is the filenames are different so the example given would not work for my needs.

For example I would have a folder called "files".
In the folder are 20 different pdf's with different filenames (e.g., abc.pdf, xyz.pdf, 123.pdf, etc).

I would need something to archive them, password protect them (same p/w).
 
Hi,

If you want to include all files inside of a given directory, you could put in the @"files_to_include.txt" something like:

Code:
c:/work/files/*.*

Or to include only files of a certain type:

Code:
c:/work/files/*.pdf

Change "/" to backslash in above code.

Chris
 
Last edited:
Hi,

If you want to include all files inside of a given directory, you could put in the @"files_to_include.txt" something like:

Code:
c:/work/files/*.*

Or to include only files of a certain type:

Code:
c:/work/files/*.pdf

Change "/" to backslash in above code.

Chris

Sorry Chris I was not clear. The problem is each filename (archive) needs to be a different name. That example would allow me to exclude or include certain file extensions.

"YOURARCHIVE.rar" is the filename of the RAR archive you are going to make. Name it whatever you wish is the problem. :(
 
Oh!

Ok. You could use the switch -ag to do this, I believe.

Here is a page with more info about it: http://www.downloadatoz.com/manual/wi/winrar/html/HELPSwAG.htm

To see the same info and you have Winrar installed, go to the Start-Programs-WinRAR and click on Console RAR Manual

Within that text file, search for -ag for examples.

One example could be using the default -ag to use YYYYMMDDHHMMSS

So your example would be:

Instead of:

"YOURARCHIVE.rar"

Try:

-ag archivename

I don't think you have to include it in double-quotes or put .rar on the end.

-ag backup

not

-ag backup.rar
-ag "backup.rar"

Let us know if that works.

Chris
 
Back
Top