You can also rename a file or move it to another folder-like location in S3 Object Storage to help organise your data. For example, you might rename report.pdf to annual-report.pdf, or move an image from images/ to archive/images/.
In S3-compatible storage, files are usually identified using object keys, not a traditional file system. Typically, a folder-like location is a prefix in the object key. This means that renaming or moving a file involves copying it to a new object key and deleting the original (if needed).
Renaming a file changes the object key but leaves the content unchanged.
For example:
Current name: documents/report.pdf
New name: documents/annual-report.pdf
You can rename the file by selecting the Rename option in your storage panel. If not, the usual alternative is to copy the file to a new object key with the desired name.
Make sure that the renamed copy exists and can be opened or downloaded before deleting the original file.
Moving a file is changing its object key, so it appears to be under another folder-like prefix.
For example :
Current URL: images/photo.jpg
Now located at: archive/images/photo.jpg
To move the file, copy it to the new object key. Once you’ve confirmed that the copied file is available and working, you can delete the original if you no longer need it.
Depending on the storage panel or S3-compatible tool you are using, the steps you are able to take may differ.
In a traditional file system , renaming or moving a file can change its location directly . In S3-compatible object storage, the object is identified by its key. Usually changing the key is done by creating a copy under the new key and optionally removing the old object.
For this reason, a rename or move operation may take longer for large files. During the operation, both the original and the copied object may exist, temporarily using additional storage space.
A file URL often includes the object's key. If you change that key, the new object may have a different URL.
For example:
Old URL path: /images/photo.jpg
New URL path: /archive/images/photo.jpg
Any website, application, script, or shared link that uses the old path may need to be updated. If the original object is deleted, its old URL may no longer work.
If the file is public, check the new URL after the operation. If it is private, make sure the application or user still has the required permissions to access it.
Permissions: Make sure you have permission to read the original object and write to the destination.
File availability: Verify the copied object before deleting the original.
Application links: Update references to the old object key wherever necessary.
Access settings: Check that the new object has the intended access permissions.
Large files: Allow enough time for the copy to finish before removing the original.
Versioning: If object versioning is enabled, copying or deleting an object may affect versions differently from a simple file-system operation.
Folder-like locations in S3 storage are generally based on object-key prefixes rather than traditional directories. Moving a folder-like location may therefore require copying the objects under that prefix to new keys and then deleting the original objects.
For example, moving objects from images/ to archive/images/ may require copying each relevant object to the corresponding destination key.
Before moving a large number of objects, verify which objects match the source prefix to avoid copying or deleting unrelated files.
Not every storage panel provides dedicated rename or move controls. If the option is unavailable, check whether the panel supports copying objects to a new name or location. Alternatively, an S3-compatible client or application may support the required operation.
The exact method depends on the tools and permissions available in your storage environment.