Forum Discussion

Asutosh's avatar
Asutosh
Copper Contributor
Aug 06, 2025

Need to Convert SharePoint Document Set to Normal Folder Without Changing URL

I have an existing Document Set in a SharePoint Online document library that I want to convert into a standard folder. However, it's critical that I do not move the files or change the URL structure, as the documents are already referenced externally. Is there a supported method to remove or downgrade the Document Set functionality and make it behave like a normal folder without breaking links or moving content?

1 Reply

  • volteak's avatar
    volteak
    Brass Contributor

    Use a PowerShell script to convert a document set to a folder while retaining the URL:

    Connect-PnPOnline -Url https://yourdomain.sharepoint.com/sites/yoursite
    $docSet = Get-PnPListItem -List Documents” -Id <ItemID>
    $docSet[ContentTypeId] = 0x0120  # Folder content type ID
    $docSet.Update()
    Invoke-PnPQuery

     

Resources