Encryption is the conversion of data into a form, called a ciphertext,
that cannot be easily understood by unauthorized people.
The Execute Process task provides flexibility in your package workflow, by allowing you to run a Windows application or batch script.
We need to encrypt all text files that are contained in folder "C:\job"
Step1: Check whether GnuPG is installed or not. If GnuPG is not installed , install the GnuPG.
GnuPG commands are using to encrypt the files.
Step2: Add ForEachLoop Container(Use to iterate files in the folder) and Execute process task
Step3 : Create SSIS variable FileName (string type).
Step4: Create For each loop container.
Select enumerator type: "For each File Enumerator".
In Enumerator Configuration
- Give the folder name in place of Folder or browse the location of files.
-Give *.txt in place of Files. Retrieve file names as Fully qualified.
Step5: Click on Variable Mappings
Select variables to map to the collection value.
Select variable User::FileName from variable dropbox.
Step6: Add Execute process task.
Click on Process
Select Executable property and add the path of exe. C:\Program Files\GNU\GnuPG\gpg2.exe
Select Argument property and add encrypting command.
- Goto Expressions. Click on expressions button. Select Arguments from property Expressions editor. Add the value in expression window. "--recipient jobpynadath --encrypt "+@[User::FileName]
Step7 : Execute the package
Output: C:\job\test.txt.gpg           
The Execute Process task provides flexibility in your package workflow, by allowing you to run a Windows application or batch script.
We need to encrypt all text files that are contained in folder "C:\job"
Step1: Check whether GnuPG is installed or not. If GnuPG is not installed , install the GnuPG.
GnuPG commands are using to encrypt the files.
Step2: Add ForEachLoop Container(Use to iterate files in the folder) and Execute process task
Step3 : Create SSIS variable FileName (string type).
Step4: Create For each loop container.
Select enumerator type: "For each File Enumerator".
In Enumerator Configuration
- Give the folder name in place of Folder or browse the location of files.
-Give *.txt in place of Files. Retrieve file names as Fully qualified.
Step5: Click on Variable Mappings
Select variables to map to the collection value.
Select variable User::FileName from variable dropbox.
Step6: Add Execute process task.
Click on Process
Select Executable property and add the path of exe. C:\Program Files\GNU\GnuPG\gpg2.exe
Select Argument property and add encrypting command.
- Goto Expressions. Click on expressions button. Select Arguments from property Expressions editor. Add the value in expression window. "--recipient jobpynadath --encrypt "+@[User::FileName]
Step7 : Execute the package







No comments:
Post a Comment