Skip to main content

Manage folders (prefixes)

Last update:

S3 has a flat structure in which a folder entity does not technically exist, but for ease of working with the storage, you can create and view simulated folders in the control panel and GUI utilities.

The folder name is a prefix in the object name. If an object is located in several nested folders, all folders make up the prefix. The prefix is included in the object name when working with storage via console utilities and the API. When renaming a folder, every object in it is effectively renamed.

note

For example, a folder Folder1 is created in a bucket, which contains a folder Folder2. The object Object.txt is located in the folder Folder2. The full object name is Folder1/Folder2/Object.txt, which you must specify when accessing via the API and command-line clients. In the object name, Folder1/Folder2/ is the prefix.

All objects in a folder inherit the bucket's properties.

A folder can be copied, moved, and deleted.

Create a folder

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Click Create folder
  5. Enter the folder name.
  6. Click Create.

Move a folder

When moving a folder, it is effectively copied to another folder and deleted from the current one.

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. If versioning is enabled or suspended in the bucket, ensure that the Versions toggle is disabled. You cannot move a folder with the toggle enabled.
  5. In the folder menu, select Move.
  6. Open the folder you want to move the folder into.
  7. Click Paste into current folder.
  8. If versioning is enabled or suspended in the bucket, turn on the Versions toggle and ensure that the objects from the moved folder have been deleted.

Copy a folder

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. If versioning is enabled or suspended in the bucket, ensure that the Versions toggle is disabled. You cannot copy a folder with the toggle enabled.
  5. In the folder menu, select Copy.
  6. Open the folder you want to copy the folder into.
  7. Click Paste into current folder.

Delete a folder

If versioning is enabled in a bucket, when a folder is deleted (objects with a certain prefix are removed), versions will be created for the objects; learn more in the Delete an object with versioning enabled or suspended subsection of the Delete an object instructions. When a folder is deleted, objects are removed without specifying a version.

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. If versioning is enabled or suspended in the bucket, ensure that the Versions toggle is disabled. You cannot delete a folder with the toggle enabled.
  5. In the folder menu, select Delete folder.
  6. Enter the folder name and click Delete.
  7. If versioning is enabled or suspended in the bucket, turn on the Versions toggle and ensure that the objects in the folder have been deleted.