Use Batch File to Encrypt or Decrypt
Use Batch File to Encrypt or Decrypt
You can automate your encryption and decryption operations by running the pfPgpEncrytorBatch program from a batch file.
The program takes one parameter, which can be either an Encryption Definition File or a Decryption Definition File.
The high-level steps needed to automate pfPgpEncryptor are as follows:
- Create an Encryption Definition or a Decryption Definition and save them to a file.
- See the Tutorial topics for more information on creating definitions files.
- Create a batch file that runs the pfPgpEncrytorBatch.exe program and takes the definition file you create as its only parameter.
- pfPgpEncryptorBatch.exe is located in the same application folder as pfPgpEncryptor.
- Run the batch file either manually or as part of a scheduled process.
Batch encryption example:
@echo off
cd C:\Program Files\ProFast Computing\PFApps\pfPgpEncryptor
pfPgpEncryptorBatch “C:\Users\Mike\Documents\PFApps\pfPgpEncryptor\EncryptionDefinitions\EncryptTutorialTestfile.xml”
:procexit
exit
Batch decryption example:
@echo off
cd C:\Program Files\ProFast Computing\PFApps\pfPgpEncryptor
pfPgpEncryptorBatch “C:\Users\Mike\Documents\PFApps\pfPgpEncryptor\DecryptionDefinitions\DecryptTutorialTestfile.xml”
:procexit
exit