Hi @ankit kumar ,
Welcome to Microsoft Q&A Platform. Thanks for posting the query.
This is complicated to achieve in data factory if the folder structure is dynamic and also there is no activity directly available to rename the file name in data factory. Below GIF shows an workaround approach to loop through folders and separate files and folders in them. Later, the files can be passed to child pipeline which can use dataflow to copy the files with new name and delete the source file using the option shown in snap below. Since we cannot use foreach inside a foreach , parent and child pipelines are used here.
Parent Pipeline:
Dataflow option in child pipeline:
I would recommend to upvote below feedback items that are related to this requirement. Also, please post any new idea in this feedback forum that is closely monitored by data factory product team and will be implemented in future releases.
4041042-rename-blobs-without-needing-to-copy-them
39756814-add-foreach-loop-nested-capability
Hope this helps! Please let us know if this is not aligning with the requirement and we will be glad to assist further.