Many system-exported folders automatically append random numbers to the end of their names, such as INV4X812, ORD7A293, etc. Different numbers make it difficult to complete a normal find-and-replace in one go. This article explains how in HeSoft Doc Batch Tool , by using the find and replace feature under folder names, selecting the option to use a formula for fuzzy text search, entering the regular expression \d{3}, and leaving the replacement content blank, you can batch delete the three-digit number in folder names, making it suitable for data archiving, project directory cleanup, and batch organization of office files.
In enterprise office and data management processes, folder names often originate from business systems, download platforms, scanning and archiving programs, or third-party export tools. These folder names frequently carry automatically generated random identifiers, such as INV4X812, ORD7A293, or PO9C376. The prefixes INV4X, ORD7A, and PO9C might be the project codes or customer codes you actually need to retain, while the suffixes 812, 293, and 376 are just additional identifiers generated by the system. The problem is that these identifiers are all different, so you cannot simply search for and delete one specific, fixed text.
If handled manually, the typical workflow involves selecting a folder, renaming it, deleting the trailing digits, confirming the change, and then moving on to the next one. This might be acceptable for a small number of folders, but when facing large volumes of project materials, Word document directories, docx contract directories, Excel report directories, or PDF scan directories, manual renaming consumes a great deal of time. This article will demonstrate how to use HeSoft Doc Batch Tool with the fuzzy matching capability of regular expressions to batch delete the random three-digit identifiers in folder names.
Applicable Scenarios: Folder names with different random identifiers but the same format
The core condition for this method to be suitable is that the content to be deleted is not identical but follows a uniform pattern. The example in the screenshots is a typical case: every folder ends with three digits; the specific numbers differ, but the format is consistent. Regular expressions can describe this pattern, allowing the software to identify all matching text at once.
Common applicable scenarios include: system-exported folders with trailing serial numbers that need to be deleted; customer data directories with three- or four-digit random codes where the customer abbreviation needs to be kept; project folders containing temporary identifiers that require uniform cleanup; downloaded batch material directories with meaningless digits that need standardized names; and the need to clean up test markers, batch numbers, or export identifiers from folder names before archiving.
HeSoft Doc Batch Tool is a batch processing tool within office software. Its key value is not opening a single document for you, but helping you process a large number of files or folders at once, reducing repetitive clicks and manual input. When organizing materials like Word, doc, docx, Excel, xlsx, PowerPoint, and PDF files, the folder name is often the first level of management entry. When names are standardized, subsequent searching, archiving, sharing, and handover all become more efficient.
Result Preview: From tagged names to clean directory names
Before processing: Random three-digit identifiers exist at the end of the names
The screenshot before processing shows 5 folders, named INV4X812, ORD7A293, PO9C376, REQ8F194, and SO2D705. The parts marked in red are the three digits at the end of each folder name. These digits are not the same value, so they cannot be deleted using a single exact search.

This kind of naming is very common in actual office work. For example, business systems might append identifiers to folders to prevent name conflicts; scanning software might add serial numbers to each batch of files; data export tools might automatically generate sequences. During later organization, these identifiers can hinder readability and sorting, thus requiring batch cleanup.
After processing: Only the effective part of the name is retained
The screenshot after processing shows that the final three digits have been deleted, with the folder names changed to INV4X, ORD7A, PO9C, REQ8F, and SO2D. The modified names are shorter and easier to identify.

It can be seen that the software did not delete all numbers in the name. For instance, REQ8F194 became REQ8F after processing, and the middle digit 8 was retained. This indicates that when setting up the rules, the regular expression should be made to match exactly the part you truly intend to delete. This example used three consecutive digits as the matching target, which aligns with the target effect in the screenshot.
How-to Steps: Batch deleting random folder identifiers using Find and Replace
Step 1: Open the Find and Replace function in the Folder Name category
After starting HeSoft Doc Batch Tool , you can see multiple tool categories in the left navigation panel. The one relevant to this task is Folder Name. After clicking it, the main area displays several folder name processing features, including Find and replace keywords in folder names.

The goal here is to delete a section of text from folder names, and using the Find and Replace function is very fitting. This is because deletion can be seen as a special type of replacement: after finding the target text, you replace it with nothing. Upon selecting this feature, the software will navigate to a step-by-step processing page.
Step 2: Click Add Folders and import the directories to be renamed
In the first step, Select the records to process, click the Add Folders button at the top right of the interface. Once added, the folders will appear in the table, which contains information like name, path, creation time, and modification time. The screenshot shows 5 folders have been added, and the record count is displayed as 5.

The key point on this page is to confirm the processing targets. Check if the Name and Path columns are correct to ensure that the folders listed are the ones you intend to batch modify. If irrelevant directories were added by mistake, you can remove the corresponding records via the operation column or use the Clear button and re-add them. After confirming everything is correct, click the Next Step button at the bottom.
Step 3: Choose to use formulas for fuzzy text search
After entering Set Processing Options, first configure the search method. The interface allows you to choose an exact text search or Use formula for fuzzy text search. Since the digits at the end of each folder name are different, you should select Use formula for fuzzy text search here.

If you choose exact text search, you would need to input a specific fixed content, like 812. However, this would only process folders containing 812 and could not simultaneously handle 293, 376, 194, or 705. The advantage of a formula-based fuzzy search is that it can use a single expression to match a whole category of content.
Step 4: Enter \d{3} to match three consecutive digits
In the List of keywords to find section on the left, enter \d{3}. This expression means matching three consecutive digits. For INV4X812, it would match 812; for ORD7A293, it would match 293; for SO2D705, it would match 705.
Here, it's important to note that the regular expression rule should be written based on your actual name structure. In this example, the content to be deleted is three digits, hence \d{3} is used. If your identifier is two digits long, you cannot directly copy this three-digit rule; if the identifier length is not fixed, you must also adjust accordingly. Before batch processing, it is best to observe a sample set to identify common patterns.
Step 5: Leave the replacement content empty so that the matched results are deleted
The area on the right is the List of replacement keywords. The screenshot specifically notes that Leaving it blank means deletion. Therefore, for this example, you do not need to fill in any replacement text and should leave it empty.
This setting will cause the software to replace the three digits matched by \d{3} with empty content. The final result is the deletion of the three-digit identifiers, not their modification into other text. This same logic can also be used to delete fixed keywords, such as removing "Backup", "Old-Version", or "Temp" from folder names; simply put the content to be deleted in the Find list and leave the Replacement list empty.
Step 6: Continue to the next step, set the save location, and execute the process
The progress bar at the top of the screenshot shows that subsequent steps are Set Save Location and Start Processing. After completing the rule setup, click the Next Step button at the bottom of the page, follow the on-screen prompts to complete the save location settings, and then enter the Start Processing step.
Caution is advised for batch renaming operations. Especially when using regular expressions, a single expression might match multiple locations. Before execution, double-check the folder list and the search rule. If the folder names are very important, it is recommended to back them up first or run a test on a small sample selection to confirm the processed names meet expectations before applying the change to all directories.
Why this method is more efficient than manual renaming
The problem with manual renaming is not just its slowness but also its uncontrollability. When processing a large number of names manually, attention can wane, leading to issues like deleting too much, too little, missing instances, or modifying the wrong directory. The advantage of a batch processing tool is that it fixes the rules, allowing the software to execute the same logic on all records, resulting in a more stable outcome.
In this example, 5 folders are just for demonstration. In a real office scenario, there could be hundreds of customer folders within one project, or data directories exported from finance, administration, HR, sales, and other departments. As long as the naming conventions are consistent, setting up a rule once with HeSoft Doc Batch Tool can batch complete work that originally required substantial repetitive clicking.
Furthermore, the fuzzy matching capability of regular expressions is suitable for dealing with variable content. A standard search can only match an exact keyword, whereas a regular expression can match a category of content, such as consecutive digits, identifiers of a specific length, or dates in a particular format. For batch processing of folder names, this is a very practical capability.
Common issues and notes
1. Could \d{3} delete three-digit numbers in the middle of a folder name?
If a folder name also contains three consecutive digits in the middle, they could theoretically be matched as well. Therefore, the rule setup must align with the name's structure. If your target is only at the end, you should confirm whether three consecutive digits exist only at the end of the name before processing. For more complex situations, you can test on a small sample first, confirm the results, and then proceed with batch processing.
2. What is the difference between an empty replacement list and using a dedicated delete function?
This example uses the Find and Replace function, achieving deletion by replacing with nothing. The interface might also have a feature to "delete text from folder names," but the demonstration shown in the screenshot uses the Find and Replace method. The advantage of Find and Replace is its clear logic: the left side defines what to find, the right side defines what to replace it with; leaving the right side empty means deletion.
3. Can this be used to process files instead of folders?
This article demonstrates an operation in the Folder Name category, so the focus is on batch modifying folder names. The left panel of the software also shows categories like File Name, Word Tools, Excel Tools, PDF Tools, etc., indicating it is a toolkit designed for the batch processing of office files. During actual operation, the corresponding category should be selected based on the processing target.
4. Do I need to close folders before processing?
To avoid issues with system lock or permissions, it is recommended to close any related folder windows in use before batch processing to prevent other programs from reading or writing to the directory simultaneously. For important directories, creating a backup first is always the safest approach.
Summary: Cleaning up a large number of folder identifiers in one go using regular expressions
When the random identifiers in folder names are different but follow the same format, regular expressions are a very suitable batch processing method. By using HeSoft Doc Batch Tool to enter the Folder Name function, selecting Find and replace keywords in folder names, adding the folders to be processed, choosing Use formula for fuzzy text search, entering \d{3}, and leaving the replacement keyword list empty, you can batch delete three-digit numeric identifiers.
This method can reduce repetitive labor, improve file organization efficiency, and make directory naming more standardized. Before formally processing a large number of folders, it is recommended that you test the rule with a few records first, confirm that the before-and-after results are consistent, and then execute the batch process. For users who frequently need to organize office documents, project archives, contract directories, or scan directories, this is a very practical approach for batch folder renaming.