Forum Discussion
hunk0227
Nov 24, 2022Brass Contributor
missing document template in the document library
Hello, I added my custom document template here in the library. my simple question is do you know where the documents are placed? I tried searching it and cannot find any in the site. ...
- Nov 24, 2022
So does it mean that we cannot just copy/migrate files created in this function and we need to grab it one by one?Through the UI? Not really, perhaps with some migration tools.
You were once able to do this with SharePoint Designer or if you access the document library through Webdav. But this does not really work well with SharePoint Online and modern authentication.
But you can list/download/update the "templates" in the forms folder through PNP Powershell and automate the process# List all files in the "forms" folder Get-PnPFolderItem -FolderSiteRelativeUrl "/Shared Documents/Forms" -ItemType File | Where-Object {$_.Name -notmatch '\.aspx$'} # Download a specific template and save it in your local current directory Get-PnPFile -Url "/Shared Documents/Forms/mytemplate.pptx" -Filename "mytemplate.pptx" -Path . -AsFile # Reupload an updated Version of the template. Add-PnPFile -Path '.\mytemplate.pptx' -Folder "/Shared Documents/Forms/" # Or put it all together to download all files from the hidden forms folder Get-PnPFolderItem -FolderSiteRelativeUrl "/Shared Documents/Forms" -ItemType File| Where-Object {$_.Name -notmatch '\.aspx$'} |foreach-object { Get-PnPFile -Url $_.ServerRelativeUrl -Filename $_.Name -Path . -AsFile }
SvenSieverding
Nov 24, 2022Bronze Contributor
There is a hidden "forms" folder inside of your document library. The templates are stored in there but are itself also hidden....
So, you need to reconstruct the url like
https://tenant.sharepoint.com/sites/mysite/documents/forms/presentation.pptx
So, you need to reconstruct the url like
https://tenant.sharepoint.com/sites/mysite/documents/forms/presentation.pptx