Forum Discussion
Franck69
2 years agoFrequent Visitor
Local Files : How to identify the directory in which the report is
Hi everybody, I need to work on a report that uses only the files that are in the same directory than the report itself. How can I find or identify in PowerQuery the directory in which the report it...
Sahir_Maharaj
Super User
2 years agoHello Franck69,
Can you please try this approach in Power Query (Advanced Editor) of your new blank query:
let
Source = Text.FromBinary(Extension.Contents("dummy.txt")),
ReportPath = Text.Start(Source, Text.PositionOf(Source, "dummy.txt") - 1)
in
ReportPath
Hope this helps.
Franck69
2 years agoFrequent Visitor
Hi Sahir, it seems that this tip doesn't work. Extension.Contents function doesn't exist with a commun connector.
Anything else ? This use case must be quite common.