Many project folders, client folders, or download directories often contain random numbers, serial numbers, date segments, and other content. Manually deleting them one by one is not only time-consuming but also prone to errors. This article uses the example of deleting the last three digits of folder names to introduce how to use the batch folder name processing feature in office software. By using wildcard regular expressions, you can perform fuzzy matching and delete specified keywords all at once, quickly making a large number of folder names uniform and concise.
In daily office work, folder names often carry unnecessary characters due to system exports, business codes, or download platform rules. For example, client directories might be followed by three-digit numbers, project folders mixed with random codes, and data archive directories containing temporary identifiers. If there are only a few folders, manual renaming is acceptable; but when the number of folders reaches dozens or hundreds, deleting keywords one by one takes up a lot of time and is prone to missed changes, accidental deletions, and inconsistent formatting.
The problem this article aims to solve is: how to use wildcards or regular expressions to batch and fuzzily delete keywords from many folder names. Below, using "deleting three-digit numbers in folder names" as an example, it demonstrates how, in HeSoft Doc Batch Tool , through the "Find and Replace Keywords in Folder Names" feature, to batch delete the trailing numbers from names like INV4X812, ORD7A293, PO9C376, ultimately resulting in cleaner folder names such as INV4X, ORD7A, and PO9C.
This type of operation falls into the typical scenario of batch folder name processing. Compared to manual renaming, the batch processing capabilities of office software can significantly reduce repetitive labor, especially suitable for jobs in administration, finance, project management, data archiving, design delivery, and R&D testing that require frequent organization of large numbers of folders.
Applicable Scenarios: Which Folder Names Are Suitable for Batch Deleting Keywords Using Regex
When the content to be deleted from folder names is not a completely fixed text but follows a certain pattern, it is very suitable to use wildcards or regular expressions for fuzzy matching. For example, in this case, each folder name is composed of a mix of letters and numbers, and the last three characters are the numbers to remove. These numbers themselves are not identical—812, 293, 376, 194, 705 are all different. If you use the common "exact text search," you would need to input multiple numbers, which is inefficient.
By using regular expressions, you can describe all this content with a single rule. For instance, \d{3} can represent three consecutive digits. As long as three consecutive digits exist in a folder name, the software can identify them and process them according to the replacement rule. If the replaced keyword list remains empty, following the interface prompt "leaving it blank means deletion," you can achieve the effect of batch deleting the matched content.
Common applicable scenarios include: deleting the three-digit suffix at the end of folder names, removing random codes in export directories, removing batch numbers from project folders, cleaning up extra digits in download folders, and uniformly organizing client folder names. If you also regularly process archive directories for Word, Excel, PDF, images, compressed packages, and other materials, this method can similarly be used to organize outer folder names, making the entire data library more standardized.
Effect Preview: Changes in Folder Names Before and After Processing
Before Processing: Folder Names Contain Number Suffixes to Be Deleted
From the pre-processing screenshot, you can see that multiple folder names contain combinations of letters and numbers, where the parts highlighted in red are the numeric keywords to be deleted. For example, the 812 in INV4X812, the 293 in ORD7A293, and the 376 in PO9C376 are all three consecutive digits at the end.

If handled manually, you would need to right-click to rename each folder one by one, delete the last three digits, and then confirm the name is correct. With many folders, this repetitive operation is not only inefficient but may also corrupt names due to copy-paste or cursor positioning errors.
After Processing: Three-Digit Numbers Batch Deleted, Retaining the Valid Prefix Names
After processing is complete, the folder names have become INV4X, ORD7A, PO9C, REQ8F, SO2D. As you can see, the original trailing three digits have all been deleted, while the valid preceding codes are preserved.

Changes in timestamps also indicate that the software performed the actual renaming operations. For a large number of folders, this batch processing method compresses numerous manual steps that would otherwise need to be repeated into a single rule configuration and one execution.
Operation Steps: Using Wildcard Regex to Batch Fuzzily Delete Keywords from Folder Names
Step 1: Enter the Folder Name Tool and Select the Find and Replace Function
After opening HeSoft Doc Batch Tool , select "Folder Name" from the function categories on the left. The interface displays multiple batch processing functions related to folder names, including find and replace, insert text, add prefix/suffix, case conversion, and delete text. This case requires matching and deleting part of the name using a rule, so choose "Find and Replace Keywords in Folder Names."

The purpose of choosing this function is to let the software first find text in folder names that meets the conditions, then replace it with specified content. If the replacement content is empty, it is equivalent to deleting the found text. This function is more suitable for batch scenarios than simple manual renaming and is more flexible than inputting fixed codes one by one.
Step 2: Add Folders to Process and Confirm the Pending List
After entering the function page, you first arrive at the "Select Records to Process" step. Click the "Add Folder" button in the upper right corner of the interface to add the folders that need batch processing to the list. In the screenshot, 5 records have been added, and the table lists information such as sequence number, name, path, creation time, modification time, and operations.

In this step, it is recommended to first check the "Name" and "Path" columns to confirm that the folders added are indeed the ones intended for renaming this time. For example, the paths in the screenshot are all under D:\test\, with the names INV4X812, ORD7A293, PO9C376, REQ8F194, and SO2D705. After confirming, click the "Next" button at the bottom to enter the processing rule settings.
The key point of this step is to control the scope of processing. Batch renaming will affect the folder names in the list, so do not accidentally mix directories that do not need processing into the list. If you find an incorrect addition, you can remove the corresponding record using the delete operation on the right side of the table, or use the clear function on the interface to re-add.
Step 3: Select Fuzzy Text Search via Formula and Input the Regex
On the "Set Processing Options" page, you need to configure the keyword rule to search for. In the screenshot, the "Search Method" is set to "Use Formula for Fuzzy Text Search," which indicates the software will match folder names according to a formula or regex rule, rather than only searching for an exact piece of plain text.

Enter \d{3} in the "Keyword List to Search For." This expression is commonly used to match three consecutive digits, perfectly corresponding to the suffix codes like 812, 293, 376, 194, and 705 in this case. Since the numbers are different for each folder, you cannot just enter one fixed number; using \d{3} allows the software to identify these digits in batch according to the pattern.
On the right is the "Keyword List After Replacement." The screenshot shows the prompt "leaving it blank means deletion." Therefore, there is no need to enter any replacement text on the right for this example; keep it empty. This way, after the software finds three consecutive digits, it will replace the matched content with nothing, effectively deleting it from the folder name.
If you need to delete other rules from your folder names, you can adjust the expression according to the actual situation. For instance, if you need to delete fixed text, you can use exact search; if you need to delete different numbers, codes, or characters of a specific format, then consider using fuzzy search rules. The key takeaway from this article's example is: using one expression to uniformly match multiple different numbers, thereby achieving batch fuzzy deletion.
Step 4: Proceed to Next Step, Set Save Location, and Start Processing
After setting the search method, search keywords, and replacement content, click the "Next" button at the bottom. The interface progress bar shows that the subsequent "Set Save Location" and "Start Processing" steps remain. Follow the software wizard to continue, confirm the save or processing location, and then start processing.
Since this case involves folder name processing, it is recommended to confirm again before execution whether the rules meet expectations: the search rule is \d{3}, the replacement content is empty, and the processing targets are the destination folders in the list. Starting processing only after confirming correctness can prevent accidentally deleting numbers that shouldn't be removed from the names.
After processing is complete, go to the directory where the folders are located to check the results. If you see that the original INV4X812 has become INV4X, and ORD7A293 has become ORD7A, it means the batch delete keywords operation has taken effect.
Common Questions and Precautions
1. Why choose "Use Formula for Fuzzy Text Search"
Because the content to be deleted in this case is not the same fixed string, but multiple different three-digit numbers. If you choose exact text search, you can only search for specified content; using formula-based fuzzy text search allows you to use rules like \d{3} to match all three consecutive digits, which is more suitable for batch deletion of random codes, serial numbers, etc.
2. Why leave the Keyword List After Replacement blank
The area on the right in the screenshot explicitly prompts "leaving it blank means deletion." This means the found content will be replaced with empty. For "deleting keywords in folder names," leaving it blank is the core setting. If you enter other text, the software will replace the matched numbers with the text you entered instead of deleting them.
3. Will using \d{3} delete three-digit numbers in other positions of the name
Note that \d{3} represents three consecutive digits. As long as content meeting this condition exists in a folder name, it may be matched. Therefore, before batch processing, observe the pattern of names. If a folder name also has three-digit numbers in the middle that you do not wish to delete, a more precise rule is needed. In this article's example, the numbers to be deleted are at the end, and the folder name structure is consistent, so this rule is suitable.
4. Is a backup needed before batch processing
When involving batch renaming, it is recommended to test the rule on a small number of folders first, and only after confirming the processing result meets expectations, expand to the full directory. For directories containing important data, it is also advisable to keep a backup or copy them to a test path first for operation. The advantage of batch processing is speed, but it also requires the rules to be set accurately.
Summary: Use Rules to Replace Manual Work and Quickly Clean Up Folder Names
Batch deleting keywords in folder names essentially delegates repetitive, mechanical renaming tasks to the office software. Through the "Find and Replace Keywords in Folder Names" feature of HeSoft Doc Batch Tool , combined with "Use Formula for Fuzzy Text Search" and regular expressions like \d{3}, you can identify multiple different codes in one go and complete batch deletion while leaving the replacement content empty.
If you frequently need to organize project directories, client folders, and data archive folders, it is recommended to incorporate such batch processing methods into your daily office workflow. First, clarify the pattern of names to be deleted, then add folders, set the search rule, keep the replacement empty, and execute the processing. This compresses a large amount of repetitive work into a few operational steps, making folder naming more standardized and subsequent retrieval, archiving, and sharing more efficient.