Does a runbook copy to nested container folders

Michael Kea Admin 0 Reputation points
2025-12-17T15:53:35.1666667+00:00

I have 2 Blobs containers that I need to copy from container A to container B/sub folder

I created a runbook to copy folders and files with no overwrite to only copy the files that are not in container b/subfolder.

If my script has src=containera and dest=containerb/subfolder will it only copy the files in the sub folder or will it create another sub folder in containerb/subfolder/subfolder?

I tried to do this with AZ copy and it did created the subfolder in the subfolder.

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 129.5K Reputation points MVP Volunteer Moderator
    2025-12-17T16:03:55.0733333+00:00

    Hi @Michael Kea Admin ,

    if you define source folder = containera and destination folder = containerb/subfolder and you copy source to destination in containerb/subfolder will be subfolders created for each subfolder in containera.

    To prevent creating a subfolder in containerb source and destination folder should be defined equal:

    src=containera and dest=containerb


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten


  2. Michael Kea Admin 0 Reputation points
    2025-12-18T18:06:45.94+00:00

    I'll give sync a try

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.