On 05.03.2016 19:33, Josef Carnap wrote:
> It looks as if  the files simply were copied to folder_2. But when I try
> to open the *.docx files with Libre Office for example I can see that
> doesn't work.
> So I guess the very problem ist the missing file extension *gpg for the
> files in folder_2.
> 
> 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)?

Hi,
the filenames are not important for the content of the files. If you run
the 'file' command on the files (i.e., "file
/media/usb/folder_2/foo1.docx"), it should tell you that these are
indeed gpg-encrypted files. You can simply rename the files to add the
'.gpg' extension if you want. The original command can be modified as

for x in /media/usb/folder_1/*; do gpg2 -o
"/media/usb/folder_2/$(basename "$x").gpg" -r 0x12345678 -e "$x"; done

if you want to append the extension directly.

Best regards,
Viktor


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to