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 Automate
Suggested Answer

Magic folder :0

(3) ShareShare
ReportReport
Posted on by 205
Hello, colleagues.
Today I faced one small problem.
In PAD I can't delete one of my folders (folder, it's in the attached file).
I've been working in PAD for quite a long time and this is the first time I've encountered this problem. I would appreciate it if you could try to delete this folder yourself.
 
1. This folder is freely deleted manually through Windows, but refuses to be deleted through PAD.
2. I have tried solving the problem by running PAD on another computer where the folder was originally created - no result.
3. I have also tried renaming the folder and deleting it again - no result.
4. I created a similar new folder and compared Windows deletion restrictions in the properties of the two folders - no restrictions. (This folder is a perfectly normal Windows folder (it's just from a different computer, that's all).
5. Yesterday my PAD was successfully deleting similar folders, but today it refuses.
6. I have not made any changes to Windows, nor have I made any other changes or adjustments to the system. I have also not updated my PAD (I have the latest version installed). So I went to bed and in the morning when I went back to work, the folder was no longer deleted.
6. Naturally I tried rebooting the system. Again, I even tried running the stream on a completely different computer - it miraculously does not delete.
 
I created a rar archive “log_files.rar” and put this very folder “folder” in it.
I also made screenshots.
I also saved the error log “Error details.txt” and the flow code itself “PAD_flow.txt”.
I appreciate your help.
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,503 Super User 2026 Season 1 on at
    Seems like there is some Read-only restrictions and it seemed to always revert back to it even when I took it off.


    Only way I found to delete that folder was to use Run PowerShell script that deletes it.


    Action to paste to your flow (change the folder path):
    @@copilotGeneratedAction: 'True'
    Scripting.RunPowershellScript.RunPowershellScriptAndFailOnTimeout Script: $'''# This code has been generated by AI. Original prompt:
    # help me delete this folder: \"C:\\Users\\YourUser\\Downloads\\log_files\\folder\"

    $folderPath = \"C:\\Users\\YourUser\\Downloads\\log_files\\folder\"
    if (Test-Path $folderPath) {
        Remove-Item -Path $folderPath -Recurse -Force
        Write-Host \"Folder deleted: $folderPath\"
    } else {
        Write-Host \"Folder not found: $folderPath\"
    }''' Timeout: 30 ScriptOutput=> PowershellOutput ScriptError=> ScriptError
     
  • absentia8 Profile Picture
    205 on at
    Thank you @eetuRobo for offering your option.
    I would like to figure out the cause rather than using a third party solution in addition to PAD in the form of using code.
    I keep looking for a simpler solution as I'm not a programmer and I'm not ready to use code to delete a folder when it should happen within PAD.
  • Suggested answer
    Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at
    Hi
     
    Avoid attempting to delete a folder that's on the desktop or any special folders like (Desktop, Downloads, Pictures, Videos). Instead, move the folder to a root directory on the C drive, such as C:\Demo\Folder, and then proceed.

    Thanks,
    Deenu
  • Suggested answer
    absentia8 Profile Picture
    205 on at
    Thanks for answering Deenuji_Loganathan .
    It's a regular Windows folder, as I posted earlier.
  • Suggested answer
    Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at
    Hi   ,
     
    Power Automate Desktop does not permit the deletion of special folders such as Desktop, Downloads, Pictures, and Videos for security reasons. As previously suggested, place your folder in a location like C:\Demo\Folder, and then attempt to delete it.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard