Hi there,
I have a flow that picks out our crew plans when they are put into the resourcing folder on sharepoint and moves them to my onedrive for Power BI to pull information from.
The issue is there are two files per week, one is a static name and the second one has the date the file is put into the folder. There are other files put in as well which I am not interested in so I need to pull out specific files.
I have a Get file content using path for the fixed name file and that works fine when I have that in the 'File Path' section
/Shared Documents/General/Current_Crew_Projection.xlsx
but I need to also need to grab
/Shared Documents/General/Current_Crew_Projection_<date here changes>.xlsx
Putting in an * didn't work as I was hoping it would, is there a way to wild card this one?
Thank.
Solved! Go to Solution.
You can use a filter query to select file names beginning with 'Current_Crew_Projection_':
This is the filter query and uses the Document Library's internal name FileLeafRef - which gives us the name of the file including its extension:
startswith(FileLeafRef,'Current_Crew_Projection_')
I then use an Apply to each loop for copy each file to a folder called 'delete' (the get file content action below is not needed in the flow):
File names beginning with 'Current_Crew_Projection_' are moved to a folder called 'delete':
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
You can use a filter query to select file names beginning with 'Current_Crew_Projection_':
This is the filter query and uses the Document Library's internal name FileLeafRef - which gives us the name of the file including its extension:
startswith(FileLeafRef,'Current_Crew_Projection_')
I then use an Apply to each loop for copy each file to a folder called 'delete' (the get file content action below is not needed in the flow):
File names beginning with 'Current_Crew_Projection_' are moved to a folder called 'delete':
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Perfect, thank you for the detailed reply. I will have a look at this now and make the changes needed.
Cheers
@ekarim2020 I found one problem with this. In Documents>General where these files get put there is also an Archive folder. When this flow triggered this morning, 500 files copied across also as it copied all the archive ones over.
Is there a way to exclude folders?
Try setting the Include Nested Items to False and re-test.
Ellis
Thank you, that makes perfect sense. Will try it out later today.
User | Count |
---|---|
85 | |
37 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
49 | |
46 | |
27 | |
25 |