When folder names contain irregular numbers, dates, or numerical suffixes, renaming them one by one is time-consuming and error-prone. This article uses HeSoft Doc Batch Tool as an example to demonstrate how to use the "Find and Replace Keywords in Folder Names" feature, employing wildcard regular expressions like \d{3} for fuzzy matching of three-digit numbers in folder names, and batch replace them with a unified text suffix to quickly standardize multiple folder names.
In daily office work, data archiving, project delivery, and data organization, there are often situations where a batch of folder names needs to be uniformly adjusted. For example, folders originally named INV4X812, ORD7A293, PO9C376, where the first half represents a business number and the last three digits represent a temporary sequence number. Now, you need to keep the preceding combination of letters and numbers and uniformly replace only the last three digits with -TEST. If you modify them manually one by one, it is not only inefficient but also very easy to miss or make incorrect changes.
This type of requirement is suitable for using the batch processing capabilities in office software. This article will combine screenshots to introduce how to use the "Folder Name" related functions in HeSoft Doc Batch Tool to perform batch fuzzy search and replace through wildcard regular expressions. You will see the effects before and after processing, and understand the complete thought process from selecting functions, adding folders, setting matching rules, to executing batch renaming.
Applicable Scenarios: Which Folder Names Are Suitable for Batch Replacement Using Regex
Using wildcards or regular expressions to batch modify folder names is particularly suitable for folders where the "name structure has rules, but the specific characters are not exactly the same." For example, some folders have a client number at the beginning and a date at the end; some have a project code at the beginning and a serial number at the end; others may contain department codes, order numbers, or version numbers in the middle. Although the full name of each folder is different, the part that needs modification shares common characteristics, such as being three-digit numbers, four-digit years, fixed-length English codes, etc.
If you are just replacing exactly the same text, you can use a normal exact search; but if you want to replace "a piece of content that conforms to a certain rule," you need to use fuzzy matching. The example in the screenshot uses \d{3}, which can be understood as matching three consecutive digits. In this way, no matter if the folder name ends in 812, 293, 376, 194, or 705, as long as it conforms to the rule of three consecutive digits, it can be matched and replaced in one go.
This type of operation is common in the following office scenarios:
- Project data archiving: Uniformly replacing temporary numbers in a batch of project folders with formal suffixes.
- Order or customer data organization: Batch modification of serial numbers in order folders and customer folders.
- Test data processing: Replacing original numbers with test identifiers, for example, uniformly changing them to -TEST.
- Standardization of departmental data: Cleaning up historical folder names with inconsistent naming rules.
- Pre-migration cleanup: Unifying the naming format before uploading to a network drive, archiving to a server, or delivering to a client.
The positioning of HeSoft Doc Batch Tool is office software, and its key value lies in batch processing of files and folders to reduce repetitive labor. For such tasks requiring the processing of multiple folder names, using a batch tool can significantly reduce operational costs compared to manual right-click renaming.
Effect Preview: Original Folder Names Containing Different Number Suffixes
In the screenshot before processing below, you can see a total of 5 folders, with names containing different three-digit number suffixes. For example, 812 in INV4X812, 293 in ORD7A293, 376 in PO9C376, etc. The parts highlighted in red are exactly the digital content to be batch fuzzy matched and replaced this time.

If done manually, you would need to click on each folder in turn, delete the digits at the end, and enter the new suffix. It might be barely feasible when the number of folders is small, but when it reaches dozens or hundreds, this repetitive operation would be very inefficient. More importantly, manual modification cannot guarantee that every name is processed according to the same rule, especially when folder names are similar but numbers differ, making it easy to miss a folder or incorrectly delete prefix characters.
Effect Preview: Unified Replacement with Specified Text Suffix After Processing
After processing is complete, the three-digit numbers in the original folder names are replaced with -TEST. For example, INV4X812 becomes INV4X-TEST, ORD7A293 becomes ORD7A-TEST, and PO9C376 becomes PO9C-TEST. It can be seen that the first half of the folder names is preserved, and only the matched three-digit number part has changed.

This effect shows that when using regular expressions for batch folder renaming, you can "only modify the local content that matches the rule," instead of replacing the entire folder name. This is very important for office scenarios where information such as project numbers, customer codes, and document classifications needs to be preserved.
Operation Step 1: Enter the Folder Name Tool and Select the Find and Replace Function
After opening HeSoft Doc Batch Tool , you can see multiple office processing categories on the left side, such as File Name, Folder Name, File Organization, Word Tools, Excel Tools, PowerPoint Tools, PDF Tools, etc. Since the processing object this time is folder names, not the docx, doc, xlsx, pdf files themselves, you need to enter the Folder Name category on the left.
Among the folder name-related functions, select "Find and replace keywords in folder names." As seen in the screenshot, the function description is "Batch find and replace keywords in file folder names," which is suitable for batch modifying a specific piece of text in folder names.

The operational purpose of this step is to first determine which kind of batch renaming capability to use. The screenshot also shows other functions, such as inserting text into folder names, adding prefixes and suffixes, changing case, and deleting text from folder names. However, this example is not simply appending content to the beginning or end of the name, nor is it deleting fixed text, but rather uniformly replacing "different three-digit numbers" with specified text. Therefore, you should choose the find and replace type function and complete it in combination with fuzzy matching rules.
Operation Step 2: Add Folders to Be Processed and Check the List
After entering the "Find and replace keywords in folder names" function, a step-by-step process is displayed at the top of the page: Select records to process, Set processing options, Set save location, Start processing. We are currently at Step 1 "Select records to process." In the upper right corner of the page, you can see the Add Folder button. Click it to add the folders whose names you want to batch modify to the task list.

After adding, the list will display the sequence number, name, path, creation time, modification time, and an operation column. The screenshot shows that 5 folders have already been added, located under D:\test\, with names INV4X812, ORD7A293, PO9C376, REQ8F194, SO2D705. The summary position at the bottom of the page shows a record count of 5, indicating that 5 folders will be processed this time.
At this step, it is recommended to carefully check the list to confirm no wrong folders have been added. If a certain folder does not need to be processed, it can be removed according to the operation column in the interface. For batch renaming tasks, confirming the processing scope in the early stage is critical, because once a folder name is modified, subsequent shortcuts, scripts, or reference relationships depending on the path may be affected. Especially in enterprise office environments, it is recommended to verify the rules in a test directory first before executing on formal data directories.
Operation Step 3: Select Formula Fuzzy Text Search and Enter Regex Rule
After confirming the folder list is correct, click Next at the bottom to enter Step 2 "Set processing options." On this page, you first need to set the search mode. The screenshot shows two methods: Exact text search and Use formula for fuzzy text search. This example needs to match different three-digit numbers, so select Use formula for fuzzy text search.

Next, enter \d{3} in the List of keywords to find on the left. This means finding three consecutive digits. Since the example folder names end with 812, 293, 376, 194, 705 respectively, these contents all conform to the rule of three consecutive digits, so they will be uniformly identified as the part to be replaced.
Then, enter -TEST in the List of keywords to replace with on the right. This means replacing the matched three-digit numbers with -TEST. According to the prompt in the screenshot, if the replacement content is left empty, it might mean deleting the matched content; but since this example aims to change the numbers to a test suffix, explicit replacement text needs to be filled in.
The expected result of this step is: the software will find the parts meeting the left-side rule in each folder name and replace them with the corresponding content from the right side. Taking INV4X812 as an example, \d{3} matches 812, and replacing it with -TEST results in INV4X-TEST. Similarly, 194 in REQ8F194 is replaced, changing it to REQ8F-TEST.
Operation Step 4: Continue with Setting Save Location and Start Processing
After setting the search mode, search keywords, and replacement content, continue by clicking the Next button at the bottom of the page. According to the process prompt at the top of the interface, you will subsequently enter the Set save location and Start processing steps. Since this task is about modifying folder names, it is recommended to reconfirm whether the rules meet expectations before continuing, especially whether \d{3} will only match the specific segment of numbers you intend to replace.
If there are multiple groups of three-digit numbers in a folder name, for example, ABC123DEF456, the fuzzy matching rule might match more than one location. In this case, you should adjust the rule based on actual needs or test it on a few folders first. The example in the screenshot is quite clear: there is only one group of three-digit numbers at the end of each folder name, so using \d{3} produces the expected result.
After completing the final step of processing, return to the file explorer to see that the folder names have been uniformly changed to the format with the -TEST suffix. The post-processing screenshot has already shown the final result, indicating the batch replacement was successful.
Common Questions and Precautions
1. Why not use the "Add prefix and suffix" function?
If you just want to append the same piece of text to the end of all folder names, you can use the add suffix function. But this example is not a simple append; it requires replacing the original three-digit numbers. If you directly add a suffix, INV4X812 might become INV4X812-TEST, and the original 812 would still exist, which does not meet the goal this time. Therefore, the find and replace function should be used.
2. Does \d{3} suit all number sequences?
\d{3} is used to match three consecutive digits. If your folder names have two-digit numbers, you could consider a two-digit rule; if they are four-digit years or four-digit serial numbers, you need to use the corresponding matching rule. In actual use, you should first observe the patterns in the folder names before deciding on the fuzzy matching expression.
3. Will it affect Word, Excel, PDF files inside the folders?
What this article demonstrates is the batch modification of folder names, not modifying the content of doc, docx, xls, xlsx, ppt, pptx, or pdf files inside the folders. Files inside folders are typically not renamed just because the folder is renamed, but if an external system depends on the original path, you need to confirm in advance whether the path change will have an impact.
4. Is a backup necessary before batch processing?
It is recommended to backup or make a copy of a test directory first. Batch renaming is highly efficient, but that also means erroneous rules will be quickly applied to multiple folders. Especially when operating in directories containing official business data, financial data, contract data, or client deliverables, it is safer to test first and then execute.
5. How to avoid false matches?
The key is to make the expression fit the naming pattern as closely as possible. If you only want to match the last three digits, but three-digit numbers might also appear in the middle of the folder name, you would need to design the rule more carefully. The folder name structure in the screenshots of this article is relatively uniform, so using \d{3} can complete the example task.
Summary: Replace Manual Renaming with Batch Tools to Improve File Organization Efficiency
Through the example in this article, you can see that HeSoft Doc Batch Tool , as a batch processing software designed for office scenarios, can help users quickly complete batch fuzzy modification of folder names. When faced with multiple folders that have different names but where some part of the characters follows the same rule, using wildcard regular expressions to find and then uniformly replace them with specified text is more efficient and more stable than manual one-by-one modification.
If you are organizing project directories, order data, test folders, or historical archive folders, and need to batch replace numbers, dates, or specifically formatted characters in names, you can follow the steps in this article: enter the folder name tool, select the find and replace function, add folders, select formula-based fuzzy text search, enter the matching rule and replacement content, and finally complete the process according to the wizard. It is recommended to test the rules with a small number of samples first, and then apply them in batches to the official directory after confirming they are correct.