0

I am trying to download some images from amazon s3 bucket with name like 126782129_06_12_2013.jpg. I have tried using:

aws s3 cp s3://[s3 folder] [local folder] --exclude "*" --include "*_*.jpg"--recursive

But it gives not output.

Can someone help me with this?

Edit:

Some files are named as 1525780172306_bs516Z2.jpg but I want to ignore such files any only get the files containing digits after the '_' sign.

Sanip
  • 1,772
  • 1
  • 14
  • 29

1 Answers1

0

Aws cp doesnot support regex. documentation

I downloaded all files and deleted unwanted files.

There should be better alternaties.

Amulya Acharya
  • 701
  • 14
  • 17
  • see https://stackoverflow.com/questions/36215713/how-to-use-aws-cli-to-only-copy-files-in-s3-bucket-that-match-a-given-string-pat too – Amulya Acharya Jan 29 '19 at 06:25