amazon web services - How to select a file from aws s3 by using wild character -


i have many files in s3 bucket , want copy files have start date of 2012. below command copies file.

aws s3 cp s3://bp-dev/bp_source_input/ c:\business_panorama\nts\data\in --recursive  --include "201502_nts_*.xlsx" 

you may want add "--exclude" flag before include filter.

the aws cli takes filter "--include" include in existing search. since files being returned, need exclude files first, before including 2015*.xlsx.

if want files format "201502_nts_*.xlsx", can run aws s3 cp s3://bp-dev/bp_source_input/ c:\business_panorama\nts\data\in --recursive --exclude * --include "201502_nts_*.xlsx"


Popular posts from this blog