Hey,
Please follow the below blog:
https://datasharkx.wordpress.com/2023/02/06/calculate-folder-size-of-an-azure-blob-storage-data-lake-storage-via-synapse-data-factory-pipeline/
To recursively iterate over the path and rather than calculating the file size, you can use a copy activity to copy the file with a new name and then delete the old file if need be