Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Encrypt Multiple file

Created: 26 Aug 2014 • Updated: 05 Sep 2014 | 1 comment
This issue has been solved. See solution.

Hi

I newbie here. I wanna encrypt multiple file by using PGP Command Line.

I tried two case below:

Case 1:

pgp --encrypt "C:\Documents and Settings\1-testing-"*.pdf --recipient 0x1112F333 --input-cleanup wipe --overwrite remove

OK, manage to encrypt.

Case 2:

pgp --encrypt "C:\Documents and Settings\\"*"-testing-"*.pdf --recipient 0x1112F333 --input-cleanup wipe --overwrite remove

Failed.

How can i implement to encrypt multiple file name as *XXX*.pdf ?

Operating Systems:
Discussion Filed Under:

Comments 1 CommentJump to latest comment

_Adam_'s picture

Hiu ChristineLee,

I did few tests but I don't know if this is what you expected and if I understood you correctly .

Have a look below:

Files:

1-testing-.txt
2-testing-.txt
3-testing-.txt
4-testing-.txt
5-testing-.txt
6-testing-.txt

Encrypt one file:
C:\Program Files\PGP Corporation\PGP Command Line>pgp --encrypt "c:\test\1-testing-"*.txt --recipient 0x518F056B --input-cleanup wipe --overwrite remove
c:\test\1-testing-.txt:encrypt (0:output file c:\test\1-testing-.txt.pgp)

Encrypt all files "*"
C:\Program Files\PGP Corporation\PGP Command Line>pgp --encrypt "c:\test\*-testing-"*.txt --recipient 0x518F056B --input-cleanup wipe --overwrite remove
c:\test\2-testing-.txt:encrypt (0:output file c:\test\2-testing-.txt.pgp)
c:\test\3-testing-.txt:encrypt (0:output file c:\test\3-testing-.txt.pgp)
c:\test\4-testing-.txt:encrypt (0:output file c:\test\4-testing-.txt.pgp)
c:\test\5-testing-.txt:encrypt (0:output file c:\test\5-testing-.txt.pgp)
c:\test\6-testing-.txt:encrypt (0:output file c:\test\6-testing-.txt.pgp)

Having files as follow:

1-testing-1.txt
2-testing-2.txt
3-testing-3.txt
4-testing-4.txt
5-testing-5.txt
6-testing-6.txt

Encrypt all files:

C:\Program Files\PGP Corporation\PGP Command Line>pgp --encrypt "c:\test\pliki test\test\*-testing-*.txt" --recipient 0x518F056B --input-cleanup wipe --overwrite remove
c:\test\pliki test\test\1-testing-1.txt:encrypt (0:output file c:\test\pliki test\test\1-testing-1.txt.pgp)
c:\test\pliki test\test\2-testing-2.txt:encrypt (0:output file c:\test\pliki test\test\2-testing-2.txt.pgp)
c:\test\pliki test\test\3-testing-3.txt:encrypt (0:output file c:\test\pliki test\test\3-testing-3.txt.pgp)
c:\test\pliki test\test\4-testing-4.txt:encrypt (0:output file c:\test\pliki test\test\4-testing-4.txt.pgp)
c:\test\pliki test\test\5-testing-5.txt:encrypt (0:output file c:\test\pliki test\test\5-testing-5.txt.pgp)
c:\test\pliki test\test\6-testing-6.txt:encrypt (0:output file c:\test\pliki test\test\6-testing-6.txt.pgp)

or:  *XXX*

C:\Program Files\PGP Corporation\PGP Command Line>pgp --encrypt "c:\test\pliki test\test\*tes*.txt" --recipient 0x518F056B --input-cleanup wipe --overwrite remove
c:\test\pliki test\test\1-testing-1.txt:encrypt (0:output file c:\test\pliki test\test\1-testing-1.txt.pgp)
c:\test\pliki test\test\2-testing-2.txt:encrypt (0:output file c:\test\pliki test\test\2-testing-2.txt.pgp)
c:\test\pliki test\test\3-testing-3.txt:encrypt (0:output file c:\test\pliki test\test\3-testing-3.txt.pgp)
c:\test\pliki test\test\4-testing-4.txt:encrypt (0:output file c:\test\pliki test\test\4-testing-4.txt.pgp)
c:\test\pliki test\test\5-testing-5.txt:encrypt (0:output file c:\test\pliki test\test\5-testing-5.txt.pgp)
c:\test\pliki test\test\6-testing-6.txt:encrypt (0:output file c:\test\pliki test\test\6-testing-6.txt.pgp)

or: *XYZ* --> I use *???*

C:\Program Files\PGP Corporation\PGP Command Line>pgp --encrypt "c:\test\pliki test\test\*???*.txt" --recipient 0x518F056B --input-cleanup wipe --overwrite remove
c:\test\pliki test\test\1-testing-1.txt:encrypt (0:output file c:\test\pliki test\test\1-testing-1.txt.pgp)
c:\test\pliki test\test\2-testing-2.txt:encrypt (0:output file c:\test\pliki test\test\2-testing-2.txt.pgp)
c:\test\pliki test\test\3-testing-3.txt:encrypt (0:output file c:\test\pliki test\test\3-testing-3.txt.pgp)
c:\test\pliki test\test\4-testing-4.txt:encrypt (0:output file c:\test\pliki test\test\4-testing-4.txt.pgp)
c:\test\pliki test\test\5-testing-5.txt:encrypt (0:output file c:\test\pliki test\test\5-testing-5.txt.pgp)
c:\test\pliki test\test\6-testing-6.txt:encrypt (0:output file c:\test\pliki test\test\6-testing-6.txt.pgp)

HTH

if/when you consider your issue is resolved, please click "Mark As Solution" on a response
SOLUTION