2

new to SharePoint (on premise-2013), I've been learning PnP for a few weeks. I would like to make a tree view of any library and I'm searching for a fast way to display the file/folder hierarchy.

I thought Find-PnPFile would allow me to get file full paths very quickly. I'm puzzled as I can retrieve files, but don't know where they really are. I'm only getting the Name, Type and Last Modified date, not even the Id. So what's the best way to extract full names with Find-PnpFile? Am I missing something with Get-PnPProperty? If not the road to follow, what would be the best alternatives?

Thanks in advance

1 Answer 1

4

You can get the relative URL this way:

$file = Find-PnPFile -Match myFile.docx
$file.ServerRelativeUrl

Just prefix https://tenantName.sharepoint.com to get the absolute path.

1
  • 1
    Thank you very much. I don't know how I didn't see it! Commented Jan 7, 2019 at 17:18

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.