I have an amazon S3 bucket with the following structure.
s3
|_ Year 2020 folder
|_ Year 2021 folder
| |_ Jan
| |_ Feb
| |_ filename_20210201.txt
| |_ filename_20210204.txt
|_ Year 2023 folder
| |_ Jan
| |_ Feb
| |_ Mar
| |_ filename_20230301.txt
Each of the year folders have sub folders for each month of the year. There are .txt files within the month folders as well. The year and month folders are added as they are needed.
How do I to get the latest filename from the latest folder using node.js.