When folder names are followed by different serial numbers or random digits, manual deletion is highly inefficient. This article demonstrates how to use the folder name batch processing feature of office software to fuzzy-find text with formulas and input regular expression rules, enabling batch matching and removal of three-digit numeric codes from names. Whether for project directories, client folders, or system-exported folders, this method can help quickly standardize naming.
Many office workers encounter a similar problem when organizing materials: the name of the folder itself is useful, but it has an automatically appended string of numbers. For example, directories exported by a system, temporarily generated project folders, and customer data backup folders often have names like INV4X812, ORD7A293. The leading parts, INV4X, ORD7A, may be valid codes, while the trailing 812, 293 are just temporary numbers that are not needed for archiving.
If you only need to process one folder, you can just rename it directly; but if you have dozens to handle, manually deleting the trailing numbers becomes obvious repetitive work. What's more troublesome is that these numbers are usually different, so you cannot simply copy the same text to replace them. This is where the value of wildcards and regular expressions shines: as long as the numbers share a common pattern, such as being a sequence of three digits, you can use a single expression to match them in batch and then delete them uniformly.
This article will combine screenshots to introduce how to perform the operation of "batch removing trailing numbers from folder names" in HeSoft Doc Batch Tool . This software is an office tool for the batch processing of files, documents, and folders, with the core value of reducing repetitive clicks, lowering manual error rates, and improving organization efficiency.
Applicable Scenarios: What is the Use of Batch Removing Trailing Numbers from Folder Names
Numbers in folder names are not always useless information, but in many organization scenarios, trailing numbers are just temporary markers that actually disrupt the uniformity of the directory. For example, after a project is exported from different systems, each directory has random numbers; after customer data is synced locally, folders have numbers generated by the platform; when test data directories are generated in batch, each folder has a sequence number at the end. If these numbers are not cleaned up before archiving, the directories will look messy, and subsequent searching and sorting will also be inconvenient.
This tutorial is suitable for the following situations: needing to batch delete numeric sequences from folder names; needing to clean up different but patterned characters from multiple folder names; wanting to use regular expressions for fuzzy matching instead of entering fixed keywords one by one; needing to organize the parent folders containing materials like Word documents, Excel sheets, PDF files, and image assets; wanting to standardize a large number of directory names into shorter, more standardized forms.
The goal in this example is very clear: delete the sequence of three consecutive digits from the names. Before processing, they are INV4X812, ORD7A293, PO9C376, REQ8F194, SO2D705; after processing, they become INV4X, ORD7A, PO9C, REQ8F, SO2D. Since the numbers to be deleted are all different, using "Formula/Regex to find text" is more appropriate than a standard exact find.
Effect Preview: From Numbered Folders to Standardized Folder Names
Before Processing: Multiple folders all with different three-digit numbers
The before-processing screenshot shows 5 folders. Each folder name consists of a leading valid character string and a trailing three-digit number, with the red highlighted part being the content to be deleted this time. As can be seen, the numbers are 812, 293, 376, 194, and 705 respectively. Although the contents are different, they all conform to the pattern of "a sequence of three consecutive digits".

If these names were to be modified manually, one would need to repeatedly enter the rename state, locate the end, delete the three digits, and press Enter to confirm. The many more files there are, the more likely problems occur, such as deleting one digit too many, one too few, or accidentally modifying the valid characters in the front.
After Processing: The numbers disappear, leaving the main folder codes
In the after-processing screenshot, the folder names have been cleaned up. The original INV4X812 becomes INV4X, ORD7A293 becomes ORD7A, and the other folders have also had their trailing three-digit numbers deleted according to the same rule.

This result demonstrates that the software does not replace a specific fixed number, but rather identifies all three-digit numbers that match the criteria according to the rule and executes a unified deletion. The efficiency improvement will be even more significant for scenarios with a larger number of folders.
Operation Steps: Batch Deleting Folder Numbers Using Wildcard Regular Expressions
Step 1: Open the Folder Name category and enter the Find and Replace function
After starting HeSoft Doc Batch Tool , select "Folder Name" in the left navigation bar. This category centrally provides various batch functions related to folder renaming. According to the screenshot, the one you need to click now is "Find and replace keywords in folder names".

The reason for choosing this entry is: we are not trying to uniformly add a prefix or suffix to folders, nor simply converting case, but rather to find a segment of content within the name that conforms to a pattern and delete it. The find and replace function can complete the processing logic of "locate first, then replace with empty", which suits the batch number-removal requirement of this article.
Step 2: Add folders and check the pending records
After entering the function page, the software will display a step-by-step workflow. The first step is "Select records to process". Click "Add Folders" in the upper right corner to add the folders you need to process to the list. In the screenshot, 5 folders have been successfully added, and information such as Name, Path, Creation Time, and Modification Time can be seen in the list.

Before proceeding, you should carefully check two things. First, whether the names indeed contain the numbers to be deleted, such as INV4X812, ORD7A293, etc.; second, whether the path is the target directory, such as the D:\test\ path in the screenshot. After confirming everything is correct, click "Next" at the bottom.
This checking step is very important. The efficiency of batch processing comes from operating on multiple records at once, but if the wrong processing scope is selected, it can also affect folders that shouldn't be processed in one go. Therefore, it is recommended to verify the list before formal execution and delete any irrelevant records if necessary.
Step 3: Set the fuzzy search rule and enter \d{3}
Upon reaching "Set processing options", you need to configure the keyword search method. The choice selected in the screenshot is "Use formula/regex to find text". This option can be understood as searching by rules, rather than searching for completely fixed text. Because the numbers 812, 293, 376, etc., to be deleted in this example are not the same, an expression that can generalize the common pattern must be used.

Enter \d{3} in the "Keyword to find list" on the left. Here, \d is commonly used to represent a digit, and {3} means appearing 3 times consecutively, so \d{3} can match a sequence of three consecutive digits. For the folder names in the screenshot, it exactly matches the three-digit code at the end.
The "Replace keyword list" on the right should be left blank. The interface prompt "Keep empty means delete", so by not entering any text here, the software will replace the matched three-digit numbers with nothing. In other words, the number is found, but nothing is put back, resulting in the deletion of the numbers as the final effect.
If you want to replace the numbers with other text, you can enter the corresponding content in the right box; however, the goal of this article is to delete keywords from folder names, so leaving the right side blank is the correct setting.
Step 4: Continue to next step, confirm the save location and execute the processing
After setting the rules, click "Next". From the interface flow, it can be seen that the subsequent steps include "Set save location" and "Start processing". Follow the software wizard to complete the subsequent confirmations, and then start the batch processing.
Before starting the process, it is recommended to double-check three points: whether the pending list is correct; whether the search method is "Use formula/regex to find text"; and whether the left expression is \d{3} and the right replace content is empty. As long as these three points are correct, the final result will be as shown in the screenshot, deleting the three-digit numbers from the folder names.
After processing is complete, you can open the original folder location to view the results. If all names have had their trailing numbers removed, it means the batch fuzzy deletion operation is complete.
Frequently Asked Questions and Precautions
Why not use the "Delete text from folder names" function?
You can indeed see a "Delete text from folder names" function in the interface, but the demonstration in this screenshot uses "Find and replace keywords in folder names". This function achieves deletion by replacing the content with nothing, while also supporting the use of formula/regex to find text in the setting items. According to the screenshot workflow, following the find and replace method achieves the goal.
Will \d{3} only delete trailing digits?
\d{3} means three consecutive digits and is not inherently limited to the end. If a sequence of three digits exists elsewhere in the folder name, it may also be matched. Therefore, in actual use, set the rule carefully according to the folder naming conventions. The three-digit numbers in this article's example are all at the end of the names, so the processing result is as expected.
What if the number is not three digits?
If the length of your number sequence is not three, you need to adjust the rule. For example, for two-digit, four-digit numbers, or numbers of different lengths, you should use an expression that matches the actual pattern. This article only demonstrates the three-digit scenario in the screenshot; do not copy the rule literally without considering your own folder naming structure.
Should I test before batch renaming?
It is recommended to test with a small number of folders first. For instance, add 3 to 5 samples first, confirm the deletion effect is correct, and then process the complete directory. For important folders, you can make a copy to a test directory first before operating. This allows you to enjoy the efficiency of batch processing while reducing the risk from incorrectly set rules.
Summary: Use fuzzy matching to batch remove numbers and make directory organization more efficient
Batch removing trailing numbers from folder names is a very common need in office data organization. This article has illustrated through a specific example: in HeSoft Doc Batch Tool , enter the "Folder Name" category, select "Find and replace keywords in folder names", add the target folders, use "Formula/Regex to find text" and enter \d{3}, then leave the replace content empty, and you can batch delete sequences of three consecutive digits from the names.
The core value of this method lies in replacing manual labor with rules. Whether you are organizing project folders, customer data folders, or cleaning up directories storing office files like doc, docx, xlsx, pdf, as long as the superfluous content in the names follows a pattern, you can reduce repetitive work through batch processing. It is recommended that the next time you encounter a large number of folders needing unified naming, first analyze the naming pattern, and then use wildcards or regular expressions to complete the batch cleanup.