Skip to main content

Notifications

Power Automate - Power Automate Desktop
Suggested answer

Magic folder :0

(3) ShareShare
ReportReport
Posted on by 175
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.
Categories:
  • Suggested answer
    Deenuji_Loganathan_ Profile Picture
    Deenuji_Loganathan_ 6,080 on at
    Magic folder :0
    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.
  • Suggested answer
    absentia8 Profile Picture
    absentia8 175 on at
    Magic folder :0
    Thanks for answering Deenuji_Loganathan .
    It's a regular Windows folder, as I posted earlier.
  • Suggested answer
    Deenuji_Loganathan_ Profile Picture
    Deenuji_Loganathan_ 6,080 on at
    Magic folder :0
    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
  • absentia8 Profile Picture
    absentia8 175 on at
    Magic folder :0
    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
    eetuRobo Profile Picture
    eetuRobo 2,691 on at
    Magic folder :0
    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
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard