You could just try to ‘ls’ that path and then check the exit status of you command I think.
From: [email protected] [mailto:[email protected]] On Behalf Of PJ Sent: Friday, September 16, 2016 12:38 PM To: Jenkins Users <[email protected]> Subject: How can I do aws s3 cp only if a folder does not exist, throw error otherwise as a part of my jenkins job? If there is a way to check if given a path/folder/file exists within S3 using the aws s3 CLI? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ac35e95f-0f58-45d3-b250-27cb02e36e89%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/ac35e95f-0f58-45d3-b250-27cb02e36e89%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/BN6PR03MB253029BC622F179192FB64ECCFF30%40BN6PR03MB2530.namprd03.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.
