0

I'm using an SSIS (2008) process task to decrypt a PGP file. It uses the gpg executable. Basically, I use a ForEach loop, store the file name as a variable, and execute the following expression as the decryption argument: "--batch --passphrase-fd 0 --decrypt-files \""+ @[User::PGPFile]+ "\""

We had been receiving (needlessly, I know) a zip file that had mutliple pgp files in it, but now we are receiving one pgp file with many text files in one zip. GPG and the entire process had been working just fine the old way. Now, while it still decrypts the pgp files ok, it merges all of the text files into one large file. I need them all to be separate files and to retain their original name.

Does anyone see exactly what I'm missing here?

billinkc
  • 59,250
  • 9
  • 102
  • 159
Kary
  • 3
  • 1
  • 3

1 Answers1

0

I don't know this ssis thing, but the gpg part seems fine. Perhaps your loop controls are backwards or not needed?

Originally you had one zip archive that contained multiple encrypted files, so you would first extract the archive and then decrypt each file (in a ForEach loop). But now you have one encrypted file, which itself contains a zip archive, so you only need to run gpg once to decrypt the archive, then extract everything with unzip.

In other words, now you have two commands to execute, no loop.

BellevueBob
  • 9,498
  • 5
  • 29
  • 56