Hi john john Pter,
Welcome to Microsoft Q&A Forum! Have a good day and I hope you're doing well!
I completely understand how frustrating and confusing it must feel when you’re only trying to move regular files, yet you end up with this error saying “Folders that have subsites can’t be deleted”, especially when you never intended to touch any folders at all!
Based on my research, here are some insights that might be useful. Even though you’re using the “Move file” action in Power Automate (and you only want to move files), behind the scenes SharePoint Online performs a Move operation in two steps: Copy the file to the destination site and delete the original file at the source and automatically delete any parent folders that become empty.
The problem occurs in step 2. When Power Automate tries to clean up the now-empty parent folders, it encounters a special folder that isn’t really a normal folder at all. In modern SharePoint Online, when someone creates a new Team Site or Communication Site and chooses “Use the same permissions as parent site” (or uses certain older templates), Microsoft mounts that entire child site directly into the parent site’s Shared Documents library, making it appear exactly like a regular folder.
From SharePoint’s perspective, that “folder” is actually a full site (with its own Site Pages, permissions, navigation, lists, etc.). Because of that, SharePoint strictly protects it and will never allow it to be deleted via regular API calls. This is exactly why you’re seeing the error “Folders that have subsites can’t be deleted”.
In your specific path, it’s very likely that one of the folders higher up in the chain is in fact a modern Communication Site or Team Site that was created this way and is being displayed as a folder.
Instead of using the built-in “Move file” (SharePoint) action, please switch to two separate actions:
1. Copy file (SharePoint) > copies the file to the destination site
2. Delete file (SharePoint) > deletes only the individual file at the source (it will not attempt to delete any folders)
This approach completely avoids the automatic folder-cleanup behavior, so the subsite-in-disguise error will no longer occur.
I hope the information I’ve provided helps clarify things and gives you some useful insights. If you have any concerns, questions, or if anything seems unclear, please feel free to reach out.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.