Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3785180
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:29:20+00:00 2026-05-19T11:29:20+00:00

Has anyone had any success reading S3 buckets as subfolders? folder1 — subfolder2 —-

  • 0

Has anyone had any success reading S3 buckets as subfolders?

folder1

— subfolder2

—- file3

—- file4

— file1

— file2

folder2

— subfolder3

— file5

— file6

My task is to read folder1. I expect to see subfolder2, file1 and file2, but NOT file3 or file4. Right now, because I restrict the bucket keys to prefix => ‘folder1/’, you still get file3 and 4 since they technically have the folder1 prefix.

It seems the only way to really do this is suck in all the keys under folder1 and then use string searching to actually exclude file3 and file4 from your results array.

Has anyone had experience doing this? I know FTP-style S3 clients like Transmit and Cyberduck must be doing this but it’s not apparent from the S3 API itself.

Thanks ahead,
Conrad

I’ve looked into both AWS::S3 and right_aws.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:29:21+00:00Added an answer on May 19, 2026 at 11:29 am

    The S3 API has no notion of a folder. It does, however, allow for filenames with “/” in them, and it allows you to query with a prefix. You seem to be familiar with that already, but just wanted to be clear.

    When you query with a prefix of folder1/, S3 is going to return everything under that “folder”. In order to manipulate only direct descendants, you are going to have to filter the results yourself in Ruby (pick your poison: reject or select). This isn’t going to help performance (a common reason to use “folders” in S3), but it gets the job done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone had any success running two different web servers -- such as Apache
Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT +
Has anyone had any success in getting Webistrano running on Windows. Everywhere I have
Has anyone had any success setting up Zend_Test? What was your method/approach and how
Has anyone had any success with adding additional information to a PDF file? We
Has anyone had any success using Hudson (or another similar build system) with Perl?
Has anyone had any success converting a VS 2008 C++/CLI (vcproj) project to a
Has anyone had any experience targetting WSH in the way that VBScript , JScript
Has anyone had any experience in building a 'real world' application with the Smart
Has anyone had any experience scaling out SQL Server in a multi reader single

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.