cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dB4
Helper III
Helper III

Flow for deleting several files from SP site.

Hello all,

 

We have an SPO site, acting as a document library - 6 parent folders with several sub-folders.

After file migration from network file server to SP online, several thumbs.db were uploaded too.

 

Is there any chance to delete all of them via a Flow?

 

Many tks

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @dB4 ,

 

I'm afraid I'm not sure whether deleting these will affect other files. Please refer to this thread to get the way to prevent the generation of similar files:

https://superuser.com/questions/330785/what-are-thumbs-db-files-for-how-can-i-prevent-them-from-bein...

 

If you think you want to delete these files directly, you could consider using the following method.

 

Use Get files (properties only) action to get all files, and then use condition to determine whether the file ends with .db, and if so, delete the file.

 

The file name of this type of file may also have other characteristics. You can use the operators included in the Condition to filter out the files that meet the conditions.

 

Image reference:

17.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
efialttes
Super User
Super User

Hi!

I guess you need a manual flow, now if all files to be deleted are in the same folder, you can use get file -properties only-, apply the corresponding filter -either ODATA filter as 'Filter query- input or adding Filter Array action block- if just some files are to be deleted, next add an 'Apply to Each' action block assigning filter outputs as its input, and a 'Delete file' action block inside it.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-bacao-msft
Community Support
Community Support

 

Hi @dB4 ,

 

I'm afraid I'm not sure whether deleting these will affect other files. Please refer to this thread to get the way to prevent the generation of similar files:

https://superuser.com/questions/330785/what-are-thumbs-db-files-for-how-can-i-prevent-them-from-bein...

 

If you think you want to delete these files directly, you could consider using the following method.

 

Use Get files (properties only) action to get all files, and then use condition to determine whether the file ends with .db, and if so, delete the file.

 

The file name of this type of file may also have other characteristics. You can use the operators included in the Condition to filter out the files that meet the conditions.

 

Image reference:

17.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,251)