Remove prefix on Execute command

Post Reply
MattV
Newbie
Posts: 14
Joined: Wed Aug 22, 2012 4:25 pm

Remove prefix on Execute command

Post by MattV »

Hello,

I'm using a 3rd party bit of software to upload content onto an Amazon S3 bucket, which is triggered/run within an execute command element via Switch.

The problem is that the prefix is left on the filename when it gets uploaded.

How can remove this prefix without outputting the file into a folder.
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Re: Remove prefix on Execute command

Post by dkelly »

You will have to rename the file prior to passing it to the upload program. Since you are using the Execute Command element you'll have to create a wrapper script/batch file to rename the file, call upload program and then rename it back. Or you could copy file to another location, upload and then delete the copy.
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Remove prefix on Execute command

Post by gabrielp »

FYI, I'm pretty sure that S3 upload in switch-aws will remove the switch prefix for you: https://github.com/open-automation/switch-aws
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
MattV
Newbie
Posts: 14
Joined: Wed Aug 22, 2012 4:25 pm

Re: Remove prefix on Execute command

Post by MattV »

@GabrielP

This looks like best option, but I'm struggling to make it work:

Error:
Image

Have installed AWS CLI 32bit and 64bit, played with the path prefix to no avail, installed python too incase a problem existed there.
But I still get same errors whatever I try.

Any advice?

Thanks
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Remove prefix on Execute command

Post by gabrielp »

What operating system?
The app communicates with the installed AWS CLI. Once AWS CLI is installed, run aws
configure to configure your account credentials within the CLI. More on that here:
https://docs.aws.amazon.com/cli/latest/ ... arted.html

The only configuration within the app that needs to be set is the “CLI Path Prefix”. For
Windows users, you can simply remove this value and leave it blank. For OSX users, you
may have to enter the path to where the AWS CLI is installed prefixed with “python”. For
example: “python /usr/local/bin/”. See the flow element properties section for more.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
MattV
Newbie
Posts: 14
Joined: Wed Aug 22, 2012 4:25 pm

Re: Remove prefix on Execute command

Post by MattV »

2008 R2.

Figured it out. Needed to make sure aws.exe was accessible by the system path and then needed a reboot.

Thanks for your help.
Post Reply