Skip to main content

Notifications

Power Automate - General Discussion
Answered

Delete file locked by user

(2) ShareShare
ReportReport
Posted on by 125

Hi Folks!

 

I have a flow that will delete a file once downloaded. I already added a delay of 3 minutes but still failed due to file is open. 

 

Is there a time frame before it close automatically? 

 

To add, the first flow is actually copying an excel, insert a data, download via PowerApps then delete flow will be trigger.

 

philifova_0-1669854201168.png

 

  • PC-24070157-0 Profile Picture
    PC-24070157-0 6 on at
    Re: Delete file locked by user

    Hi @v-chengfen-msft,

    Thanks for this solution. Though the delay is a little time-consuming, it works. I wonder if there is a workaround such as "force delete" flow or using check-out/in to officially close the file? Thanks. 

  • Verified answer
    Re: Delete file locked by user

    Hi @philifova 

    The reason for this problem is:
    1. The file is locked for shared use, so you cannot run the process to delete the file.

     

    Here is a test for your reference:

    vchengfenmsft_0-1669859761886.png

    Set 【Delay】 Configure run after

    vchengfenmsft_1-1669859836204.png

    vchengfenmsft_2-1669859858841.png

     

     

    Here are some links for your reference:

    Locked file checking pattern in Power Automate • Tomasz Poszytek, Business Applications MVP

    Solved: Unable to Delete file - File is locked for shared ... - Power Platform Community (microsoft.com)

    Hope it can help you.

     

     

    Best Regards

    Cheng Feng

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,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard