0

using objects = s3Client.list_objects("sample", "samplefolder/sample1")

i managed to get into the folder, but i want to print/download the files in the folders that is sorted out with timestamp subfolders.

any idea on how to solve this ?

  • probably you will have to get all filenames and dates in folder, and print/download every file separatelly. And if you will have subfolder then you will have to repeate it for subfolder - so you will need recursion. – furas Jun 21 '21 at 06:53
  • can you help write a sample code ? thank so much in advance – Styleeeeez Jun 21 '21 at 07:00
  • I don't use S3. I only know that other services usually need this method to get something more than single file. – furas Jun 21 '21 at 11:09

1 Answers1

1

Setting the recursive parameter will do the trick – returns a flat list of paths.

objects = client.list_objects(minio_bucket, folder_name, recursive=True)
Joe Web
  • 558
  • 5
  • 11