Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Get Data from Folder with Today's Date

Hi all,   I need PowerQuery to go every time and  search for a file that is stored in a folder with today's date.   Explanation:   Our raw data (the one we feed to PowerQuery) are stored to our...
  • dax's avatar
    6 years ago

    Hi luke_avalle, 

    You could try below M code to see whether it work or not

    let
        Source = Folder.Files("C:\Users\(username)\Documents\New folder"),
        #"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "C:\Users\zoezhi\Documents\New folder\"&Date.ToText(DateTime.Date(DateTime.LocalNow()),"yyyyMMdd")&"\"))
    in
        #"Filtered Rows"

     

    Best Regards,
    Zoe Zhi

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