Walter_C
Databricks Employee
Databricks Employee

You can try:

from databricks.sdk import WorkspaceClient

# Initialize the WorkspaceClient
w = WorkspaceClient()

# Define source and destination paths
source_path = "/Volumes/<source_catalog>/<source_schema>/<source_volume>/<file_name>"
destination_path = "/Volumes/<destination_catalog>/<destination_schema>/<destination_volume>/<file_name>"

# Move the file
w.files.move(source_path, destination_path)

# Verify the file has been moved
for item in w.files.list_directory_contents(f"/Volumes/<destination_catalog>/<destination_schema>/<destination_volume>"):
    print(item.path)