Page 1 of 1

Decrypt files in folder

Posted: Mon Mar 28, 2016 8:00 am
by kim980
How do i decrypt files in a folder using aescrypt?
I am using batch file to write the codes but command prompt to call the batch file.

Thanks.

Re: Decrypt files in folder

Posted: Mon Mar 28, 2016 2:43 pm
by paulej
You could do something like "aescrypt -d folder/*.aes" where "folder" is the name of the folder containing files or the pathname.

Re: Decrypt files in folder

Posted: Tue Mar 29, 2016 2:38 am
by kim980
Thank you so much!

I have another problem, is there any command line for me to delete the encrypted files or put the decrypted files into another folder? Because i just wish to see the decrypted files in the folder.
Thanks in advance!

Re: Decrypt files in folder

Posted: Tue Mar 29, 2016 5:34 am
by paulej
AES Crypt doesn't have a means of deleting files. But, if you are encrypting all files in a folder, you could do something like:

aescrypt -d folder/*.aes
mkdir encrypted
move folder/*.aes encrypted/

I can't recall the exact DOS syntax, but something like that should be possible.

You could also remove the original encrypted files using the "del" command. But, if a file or set of files fails to decrypt, you don't want to just erase all of them. I could create a much more intelligent script on Linux to check for such failures, but don't know how to do that on DOS.