Using C# and amazon .Net SDK,able to list all the files with in a amazon S3 folder as below:
ListObjectsRequest request = new ListObjectsRequest();
request.BucketName = _bucketName; //Amazon Bucket Name
request.Prefix = _sourceKey; //Amazon S3 Folder path
do
{
ListObjectsResponse response = _client.ListObjects(request);//_client - AmazonS3Client
Out put:
Folder
Folder/file1.pdf
Folder/file2.pdf
Folder/file3.pdf
But i wanted to achieve something like this: Desired Output:
file1.pdf
file2.pdf
file3.pdf
Thanks in advance