web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / System.IO.IOException:...
Power Automate
Unanswered

System.IO.IOException: The directory is not empty

(0) ShareShare
ReportReport
Posted on by 2

I am currently making a flow that is supposed to create and delete a folder through the process. Instead of simply deleting the folder however powerautomate gives me this error "System.IO.IOException: The directory is not empty" even though it specifically states in the "delete folder" block that it will delete the folder including its contents. It worked up until today and i've changed virtually nothing. Is it possible that this is an error from powerautomates side? If its not I'm completely lost.

Screenshot 2024-06-21 131328.png
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @JSTInfo 

     

    You may try to delete empty folder, If its working fine then you modify your flow to delete all existing files in your folder then use the delete directory action to delete your folder. 

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @JSTInfo ,

     

    As per my understanding there may be 2 reasons,

    1. There might be a process that is still using a file within the directory. This could prevent the directory from being deleted. Make sure no files in the directory are open or being used by another process.

     

    2.There could be a permissions issue preventing the deletion of some files within the directory. Ensure that the account running the flow has sufficient permissions to delete all files and subdirectories within the directory.
    The directory might contain hidden or system files that are not being deleted. Check the directory for such files.

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 432

#2
11manish Profile Picture

11manish 313 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 154

Last 30 days Overall leaderboard