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 pfEncrytorBatch 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 pfEncryptor are as follows:
- Create an Encryption Definition or a Decryption Definition and save them to a file.
- See the Tutorial topic for more information on creating definitions files.
- Create a batch file that runs the pfEncrytorBatch.exe program and takes the definition file you create as its only parameter.
- pfEncryptorBatch.exe is located in the same application folder as pfEncryptor.
- Run the batch file either manually or as part of a scheduled process.
Batch encryption example (two files are encrypted):
@echo off
cd C:\Program Files\ProFast Computing\PFApps\pfEncryptor
pfEncryptorBatch “C:\Users\Mike\Documents\PFApps\pfEncryptor\EncryptionDefinitions\EncryptTutorialTestfile.xml”
pfEncryptorBatch “C:\Users\Mike\Documents\PFApps\pfEncryptor\EncryptionDefinitions\EncryptFile1.xml”
:procexit
exit
Batch decryption example (two files are decrypted):
@echo off
cd C:\Program Files\ProFast Computing\PFApps\pfEncryptor
pfEncryptorBatch “C:\Users\Mike\Documents\PFApps\pfEncryptor\DecryptionDefinitions\DecryptTutorialTestfile.xml”
pfEncryptorBatch “C:\Users\Mike\Documents\PFApps\pfEncryptor\DecryptionDefinitions\DecryptFile1.xml”
:procexit
exit