I want to be able to loop through all the documents in a document library (it has thousands of folders) - and for each document, set the value of a custom column depending on the document name.

Greg Booth 1,316 Reputation points
2021-06-17T10:01:31.217+00:00

I want to be able to programmically loop through all the documents in a document library (it has thousands of folders with documents in each folder) - and for each document, set the value of a custom column depending on the document name.
(When we loaded the documents, the name of each file started with a string in brackets and we want to be able to grab this string and put the value into the new column. The documents are already loaded).
I would prefer to user powershell or power automate if thats possible.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,632 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,609 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,940 questions
0 comments No comments
{count} votes

Accepted answer
  1. Elsie Lu_MSFT 9,796 Reputation points
    2021-06-18T08:53:30.533+00:00

    Hi @Greg Booth ,

    Per my understanding, Powershell cannot meet this requirement. You can try to use Power Automate to test whether this requirement is possible. Since we provide help on SharePoint in this forum, Power Automate is a product independent of SharePoint.

    I would suggest you go to the forum dedicated to Power Automate for more professional advice:
    Microsoft Power Automate Community


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.