Page 1 of 1
Use execute command
Posted: Tue Jun 07, 2011 4:53 pm
by IkariGend
I am trying to use "execute command", but everything I tried failed, using Full Switch 09 on OS X 10.6.
The thing I wanted to accomplish is using switch to encrypt files via gpg before sending them to an ftp. So I tried the "execute commad" with the command "gpg" and the arguments for the input file, outputfile, the key to encrypt etc. But the best I got was an "ExecuteComandTemp" folder in the destination folder.
Anyone an idea how to get it to work, or did a similar thing?
Use execute command
Posted: Tue Jun 07, 2011 5:01 pm
by mattbeals
There could be many reasons. Can you post the command string you are using.
Use execute command
Posted: Tue Jun 07, 2011 5:16 pm
by IkariGend
I tried different things, here are two examples:
command or path: gpg
arguments (define single-line text with variables): --out [Job.Path].gpg --encrypt -r 'Test-Key' [Job.Path]
or:
command or path: gpg
arguments (inline value): --out "%2".gpg --encrypt -r 'Test-Key' "%1"
Use execute command
Posted: Tue Jun 07, 2011 5:54 pm
by dkelly
Is "gpg" program in your PATH? Try specifying the complete path to gpg, eg. "/opt/local/bin/gpg"
Dwight Kelly
Apago, Inc.
dkelly@apago.com
Use execute command
Posted: Wed Jun 08, 2011 9:24 am
by rzacherl
Hi,
your second approach
IkariGend wrote:
command or path: gpg
arguments (inline value): --out "%2".gpg --encrypt -r 'Test-Key' "%1"
is the right one but you added the extension .gpg to the output path placeholder %2. This is wrong. Leave it away here and define the extension of the output file with help of the "Output extension" sub-property of the the Execute command "Output" property.
Regards,
Robert
Use execute command
Posted: Fri Jun 10, 2011 7:15 am
by mattbeals
If I may, what are you using public key encryption with Switch for? This is the first time I have seen or heard of anyone doing so in a Switch workflow.
Use execute command
Posted: Wed Jul 13, 2011 5:11 pm
by IkariGend
Got it to work:
command or path: /usr/local/bin/gpg
arguments (inline value): --out "%2" --encrypt -r "
test@something.com" "%1"
output: file at path
works great, i also do the decryption with the arguments: --out "%2" --batch --decrypt "%1"
@mattbeals: I need it because all files must be encrypted that leave our company via ftp and also the other direction. This is because our IT doesn't support SFTP yet.
Use execute command
Posted: Wed Jul 13, 2011 11:06 pm
by mattbeals
Great idea!