Skip to content

bucket_copy_folder

jaybgager edited this page Sep 25, 2026 · 4 revisions

Warning

Existing files or folders in the destination folder with the same name as files or folders in the source folder will be overwritten.

This function copies a folder from one location to another on a cloudfiles-managed S3-style bucket. Requires permission to write to the bucket.

Arguments:

  • source_path (string, mandatory)
    • the absolute path to the directory whose contents you want to copy
  • dest_path (string, mandatory)
    • the absolute path to the directory where you want the information to be copied
    • this will create new directories where none exist

Example

INPUT:

import tracertools as tt

tt.bucket_copy_folder(
    source_path = "bucket://path/to/old/folder",
    dest_path = "bucket://path/to/new/folder",
)

This will copy the contents of the source_path folder into a new folder created with the dest_path argument.

Clone this wiki locally