Help with a script for AES Crypt

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
Jon
Posts: 3
Joined: Thu Feb 12, 2015 12:42 am
Contact:

Help with a script for AES Crypt

Post by Jon » Thu Feb 12, 2015 12:55 am

Hello Paulej
I am very interested though what that sample script file encryption AES Crypt in large quantities from several folders on your computer.
Thank you for your software!

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Help with a script for AES Crypt

Post by paulej » Thu Feb 12, 2015 12:38 pm

If using Linux, you could easily write a script to encrypt all files in select directories. It might also be possible in DOS, but I'm not a batch script guru and never used PowerShell.

AES Crypt can encrypt any number of selected files from the GUI at once. However, it doesn't operate on directories. For that, I generally use ZIP or tar files, myself.

Jon
Posts: 3
Joined: Thu Feb 12, 2015 12:42 am
Contact:

Re: Help with a script for AES Crypt

Post by Jon » Fri Feb 13, 2015 7:57 pm

Okay, but if you get a list of addresses that you want to encrypt the file, and pass it to the program, it will encrypt the files on the list?
example:
DIR /B /S C:\*.txt;C:\*.jpg /A-D > log.txt | aescrypt -e -p apple
Wakes it work?

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Help with a script for AES Crypt

Post by paulej » Sat Feb 14, 2015 12:26 am

Jon wrote:Okay, but if you get a list of addresses that you want to encrypt the file, and pass it to the program, it will encrypt the files on the list?
example:
DIR /B /S C:\*.txt;C:\*.jpg /A-D > log.txt | aescrypt -e -p apple
Wakes it work?
No, that won't work. However, if you had a way to put those on the right side of the command, it would.

To do something like that using Linux, I could write this:

Code: Select all

for x in `ls /some/dir /another/dir`
do
    aescrypt -p apples -e $x
done
It's been years since I did any batch file writing in windows, but if memory serves, there is a "for" command that works kinda like that in Linux's bash shell. I assume Windows powershell has this ability, too.

The error in your original example is that one or more filenames must be specified at the end. If stdin is used, rather than a filename, then - takes the place of a filename, but there is only one file piped to aescrypt that way.

Jon
Posts: 3
Joined: Thu Feb 12, 2015 12:42 am
Contact:

Re: Help with a script for AES Crypt

Post by Jon » Sat Feb 14, 2015 5:19 am

Excuse me for my importunity, but I'm probably not so explained. The bottom line is that I want to implement encryption of files on a mask on the local disk. To do this, I get a list of all files matching mask, write down their addresses in the file log.txt and try to make the program encrypt each file in the list. Is it real ?

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Help with a script for AES Crypt

Post by paulej » Sat Feb 14, 2015 10:37 pm

I'm sure it can be done with either batch files or Power Shell. Unfortunately, I doubt know how to do it.

Post Reply