Decrypt files in folder

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
kim980
Posts: 3
Joined: Thu Mar 24, 2016 7:11 am

Decrypt files in folder

Post 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.
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Decrypt files in folder

Post by paulej »

You could do something like "aescrypt -d folder/*.aes" where "folder" is the name of the folder containing files or the pathname.
kim980
Posts: 3
Joined: Thu Mar 24, 2016 7:11 am

Re: Decrypt files in folder

Post 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!
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Decrypt files in folder

Post 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.
Post Reply