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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Delete a selected file

(0) ShareShare
ReportReport
Posted on by 4

Hi all,

 

I know it sounds not very useful what I try to do, but I just simplified the problem so that it is easier to explain. Basically, I want to delete a file via a flow, which I selected first in a library. When I test the flow, it tells me that it can't find the file. It is definitely there! Result from Test:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flow:

Untitled2.png

 

If I use the picker for the delete command, it works without issues. If I type in the text, exactly the same like displayed getting there with the picker, it doesn't work either...

 

Is there some setting in the background I need to change? Or is it because I try to delete the file which is also triggering the flow?

 

I don't really get it, I created a very long flow with get metadata, creating new filenames, coping files... everything works besides the final step of deleting the file...

 

Thanks,

-Kev

I have the same question (0)
  • abm abm Profile Picture
    32,585 Most Valuable Professional on at
    Re: Delete a selected file

    Hi @KevRit 

     

    You need to pass the file identifier Id for deletion. You can get the ID from the selected file action step.

     

    image.png

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Delete a selected file

     

    Hi @KevRit ,

     

    We need to configure Identifier in Delete file action.

    You could use Get file properties action to get Identifier first.

    Please refer to the following image to configure Flow:

    169.PNG

    Hope this helps.

     

    Best Regards,

  • abm abm Profile Picture
    32,585 Most Valuable Professional on at
    Re: Delete a selected file

    Hi @KevRit 

     

    I didn't realised that file identifier and Id from the selected files are two different things. Too many ID's 🙂 Please follow @v-bacao-msft  suggestion. That should work.

     

    Thanks

  • KevRit Profile Picture
    4 on at
    Re: Delete a selected file

    Hi thanks for your help! I didn't try your recommendations, but it seems very reasonable, I thought the whole time that ID and Identifier are the same fields.

     

    I found another solution. Instead of writing '/', I wrote %252f, because that field gets interpreted as url. That worked too.

     

    Thanks,

    -Kevin

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard