cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
72Zib
Helper I
Helper I

File Delete Fail

Hi, I am trying to delete files from SharePoint, the process I am using it runs and deletes files but after all files are deleted I am getting a failed message. After the delete I will create new file from outlook attachment but with the fail no additional steps will go forward.

72Zib_0-1632435144717.png

72Zib_1-1632435265453.png

Thanks

Z

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @72Zib 

 

I tested this now and replicated the error. In your list folder its returning the files and folders. You can't delete the folder using Delete File step. See below the check I am doing.

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

8 REPLIES 8
abm
Super User
Super User

Hi @72Zib 

 

Could you expand the Delete File step and post  a screenshot of the error you getting?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Here is the expended delete step, there was only one file and it looks like it tries 2nd time and that is where it failed

72Zib_0-1632436239753.png

 

 

 

Hi @72Zib 

 

Thanks for your reply. You mentioned it runs and delete files but I can see it's failed inside the loop. Are you sure its deleting the files? How you mapping the Delete File step? Are you passing the file id?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
abm
Super User
Super User

Hi @72Zib 

 

Also for deleting the files you need the identifier? To get the file identifier you need to add Get File Properties action step. This returns the file identifier. Using the Id you should be able to delete the files.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Here are the steps:

in the file identifier / List folder step I input the folder name where the file is located, should i make another step to get Files Properties? Also i did check and the files are removed from the folder. on the screenshot below I did it with 4 files.

72Zib_0-1632438098925.png

 

 

72Zib_1-1632438500435.png

 

Hi @72Zib 

 

So why you getting the last error then? Check the run history and compare with List Folder returned data set. It could be something else causing this. Check the List Folder data and its types? Is that all returned the files only. Is contains another folder or something ?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Hi @72Zib 

 

I tested this now and replicated the error. In your list folder its returning the files and folders. You can't delete the folder using Delete File step. See below the check I am doing.

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

All files in the folder are the same "blank .xlsx" files created in the folder directly from excel online. I do not know how to compare history and with List Folder returned data set. There is no 2nd folder inside this one.

 

Thanks

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (950)