Encryption of multiple files into another directory
peter at digitalbrains.com
Sat Mar 5 21:12:44 CET 2016
On 05/03/16 19:33, Josef Carnap wrote:
> After processing there are files in folder_2, but the file have the same
> file extenstion like the original files: foo1.docx, foo2.docx, foo3.docx
> So I guess the very problem ist the missing file extension *gpg for the
> files in folder_2.
Yes! Hehe :)
> Do you have any idea to modify the command so that the files in folder_2
> are: foo1.docx.gpg, foo2.docx.gpg, foo3.docx.gpg etc. (without renaming
> the files manually)?
for x in /media/usb/folder_1/*; do gpg2 -o "/media/usb/folder_2/$(basename "$x").gpg" -r 0x12345678 -e "$x"; done
I simply forgot the extension, and GnuPG does what "I" told it to do.
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <http://digitalbrains.com/2012/openpgp-key-peter>
More information about the Gnupg-users