Use execute command

Post Reply
IkariGend
Newbie
Posts: 4
Joined: Tue Nov 23, 2010 8:25 am

Use execute command

Post 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?
mattbeals
Member
Posts: 59
Joined: Fri Oct 29, 2010 2:49 am
Location: Edmonds, WA
Contact:

Use execute command

Post by mattbeals »

There could be many reasons. Can you post the command string you are using.
I'm just a dude. Anything I say has nothing to do with any other person or company.
IkariGend
Newbie
Posts: 4
Joined: Tue Nov 23, 2010 8:25 am

Use execute command

Post 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"
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Use execute command

Post 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
rzacherl
Member
Posts: 38
Joined: Mon Mar 21, 2011 3:29 pm

Use execute command

Post 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
mattbeals
Member
Posts: 59
Joined: Fri Oct 29, 2010 2:49 am
Location: Edmonds, WA
Contact:

Use execute command

Post 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.
I'm just a dude. Anything I say has nothing to do with any other person or company.
IkariGend
Newbie
Posts: 4
Joined: Tue Nov 23, 2010 8:25 am

Use execute command

Post 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.
mattbeals
Member
Posts: 59
Joined: Fri Oct 29, 2010 2:49 am
Location: Edmonds, WA
Contact:

Use execute command

Post by mattbeals »

Great idea!
I'm just a dude. Anything I say has nothing to do with any other person or company.
Post Reply