Forum Discussion
campelliann
4 years agoPost Patron
How to Extract First File from Folder if the file name changes.
Hi there,
So I am basically extracting the first file from a folder with power query. I use Sharepoint.Contents, and then sort by descending the modified date and keep the first row.
The issue is when I grab the content, the M Query retains the file name (Oldfile.xlsx). But Imagine the user changes the name to NewFile.xlsx the code will still have:
#"Sorted Rows"{[Name="Oldfile.xlx"]}[Content]
Thanks
2 Replies
- campelliannPost Patron
Is it just #sortrows{0}[content]?
- BA_PeteSuper User