With Document Number Generator you can identify or classify any document. In this article we will guide you how to rename documents in document library in bulk. You will get information on renaming both new and already existed documents. We can create a numbering scheme for the Name field and specify a formula, then after Apply the numbering scheme to the document library, the Name field for documents in the document library will be edited in bulk automatically.
The Name field in the document library are bulk edited according to the naming scheme we created.
Create a document library named as Product Brochures from the Document Library template on your SharePoint site with several columns as following. You can create the document library based on your needs. Here we have Name (a Single line of text column), Product (a Single line of text column with a Default Value of “To Be Specified”), Written By (a Choice column with options of “Sam”, “Cecilia”, “Gabi” and “Violet”, and the Default Value is “Gabi”), Version, and Content Type columns in Product Brochures. And we have uploaded 4 PDF documents into our document library.
Download the trial version of Document Number Generator, and install it to your SharePoint server.
Navigate to the Product Brochures library prepared above.
Click LIBRARY on the ribbon, and then click Library Settings in the Settings group.
On the Library Setting’s page, click Document Number Generator Settings (Powered by BoostSolutions) under General Settings.
Then, you will be redirected to the Document Number Generator Settings’ page. Here you can add new document numbering schemes. Click Add New Scheme to add a new scheme for Product Brochures.
Then, the Create Document Numbering Scheme dialog will pop up as following. There are 5 sections on the Create Document Numbering Scheme page.
Scheme Name: a required section, you must enter a unique name for this scheme.
Content Type: a required section, it consists of two parts. Select a content type and Which field should use the scheme through which you can specify which document type in this document library should use the scheme if there are more than one content types in the document library and to which column/field the scheme should apply.
Formula: a required section, in this section, you can build the formula for this scheme by using Add element to add a combination of variable and separator and use Remove element to remove it. In the Formula Preview field, you can preview the formula you are building. Click Select a field… to add the first element, then select the Separator by clicking the drop-down menu right next to the Select a field… to insert a separator between the first and the second element (for the separator, we support 5 separators, they are “-“, “_”, “.”, “/” and “\”), then you can click Add element to add another variable to the formula if needed, the separator between variables will be generated with the new added element along automatically.
Date Format: an optional section, it is useful in case you add at least one Date and Time typed field in the formula, you can specify the Display Format of the Date and Time typed field in the formula. The default value is Default SharePoint Format.
Regenerate: an optional section, you can specify if document numbers are regenerated whenever document properties are edited, saved and checked in. It is checked by default.
Now, let’s configure the new creating numbering scheme as following:
First, let’s input a unique name for the scheme, here we name the scheme as Naming Rule for Brochures.
In the Content Type section, select Document for Select a content type, and select Name for Which field should use the scheme, then the scheme we are creating will work on the Name field for documents with the Content Type of Document.
In the Formula section, let’s configure the naming formula itself. First, click Select a field… to select the first variable for the formula from the drop-down list. Here we select the Product field.
Then, let’s click the drop-down menu right next to the Name field to add a separator between the first and the second element, here we select the separator “_”, as you can see, in the Preview Formula field, you can preview what you have built in real time.
Then, let’s click Add element to add another variable to the formula, this time we select the Custom Text. And in the field, we input the custom text: WrittenBy.
Now, select the separator again, this time we select the separator”-”.
Then, let’s click Add element to add another variable to the formula, this time we select the Written By field.
Now, select the separator again, this time we select the separator”-” again.
Finally, let’s click Add element again to add the last variable to the formula, this time we select the Version field.
In the Formula Preview field, you can preview the formula we are working on as shown below.
For Date Format section, because we didn’t add any Date and Time field to the formula, so we just leave it as it is.
In Regenerate section, let’s keep it as default, checked. Then the document number will be updated whenever document properties are edited, saved and checked in. Now, click OK to save the new created numbering scheme.
Then, you will see the new created scheme has been listed on the Document Number Generator Setting’s page as shown below.
Now, let’s click Apply to apply the numbering scheme Naming Rule for Brochures to the document library Product Brochures. (Remember: You need to Apply the numbering scheme manually to documents which have been uploaded into the document library)
After clicking Apply, the notification dialog will pop up to notify you that this will overwrite the Name field with specific scheme for all items. Click OK.
After a short loading process, you will see the
appear on the right of the Apply button, indicating that the scheme has been applied to the document
library successfully.
Now, let’s navigate to the Product Brochures, you will find that the Name field for all documents has been updated according to the numbering scheme we created. The Name field of documents in the document library has been bulk edited.
Now let’s add some more documents to the library. Here we add 2 more PDF documents to Product Brochures. They are List Transfer Brochure and Bulk Zip Unzip Brochure.
As you can see, after the uploading finished, only 1 new uploaded document’s name has been manipulated accordingly to the naming scheme we created. The other one’s name remains still. That’s because in the document library, the Name field should have unique value, based on our formula, if the scheme applied to the 2 new uploaded documents, they will have the same value for the Name field, so that’s why the scheme only applied to one of them.
Now, let’s try to edit the last item in the document library, change its Product field from default value (To Be Specified) to List Transfer, and change its Written By field to Cecilia, then click Save.
Let’s navigate to Product Brochures again, you will find that the Name field for the last item has been regenerated automatically according to the naming scheme. That’s how Regenerate works.
Of course, you can make modification for item “Bulk Zip Unzip Brochure” as well if you wish. Here we change its Product field to Bulk Zip Unzip, and change its Written By field to Violet.
In the Product Brochure, you will find that the Name field for item “Bulk Zip Unzip Brochure” has been regenerated as we expected. The Regenerate did that for us again.
Note: Name is a specific column and cannot contain these characters: \ / : * ? “ <> |. If you insert SharePoint columns in the formula and apply it to the Name column with these characters, then the new name cannot be generated.