Batch fuzzy deletion of folder name keywords: A complete guide to regular expression search and replace


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-07-01 06:22:48

Disclaimer: All images, text, and video content on the website are for reference only and may not be the latest, correct, or accurate. In case of any dispute, please refer to the actual experience effect!

When folder names are mixed with serial numbers, random digits, or export identifiers, modifying them one by one is both slow and error-prone. This article provides a complete workflow: first confirm the naming effects before and after processing, then add folders in your office software, select formula-based fuzzy text search, input a regular expression to match three-digit numbers, and leave the replacement content empty, thereby batch-deleting the target keywords from folder names.

During data archiving, project delivery, client file organization, and system data export, folder names often include unnecessary keywords. These might be random numbers, serial numbers, batch numbers, or identifiers automatically added by platforms. The problem is that these keywords are often not identical and cannot be quickly removed through simple copy and paste.

For example, the folder names before processing are INV4X812, ORD7A293, PO9C376, REQ8F194, SO2D705. What needs to be kept is the first part of the code, with the final three digits being superfluous. If deleting individually, 5 folders are not troublesome; but for 50 or 500 folders, it becomes low-value, highly repetitive office labor.

This article will introduce how to use HeSoft Doc Batch Tool , utilizing the "find and replace keywords in folder names" feature, combined with the regular expression \d{3}, to batch and fuzzily delete three-digit numbers from folder names. This tool is positioned as a batch processing tool in office software, suitable for handling files, folders, and various office material organization tasks, helping users reduce repetitive operations and improve file management efficiency.

Applicable Scenarios: How to Determine When to Fuzzily Delete Folder Name Keywords

Two conditions can help determine if regular expression fuzzy deletion is suitable. First, the content to be deleted is not identical across multiple folders. Second, this content has describable common rules. In the example in this article, 812, 293, 376, 194, 705 are not the same, but they are all continuous three-digit numbers, so they can be matched at once using \d{3}.

You can also refer to this tutorial if you encounter the following situations: folder name suffixes have varying numbers that need uniform removal; system-exported directories contain random identifiers that need cleaning; batch numbers are mixed into project material folder names, and the main name needs preserving; client or order directories need temporary identifiers removed; the outer directories for large numbers of Word, docx, Excel, PDF, and image files need standardized naming.

It should be noted that fuzzy deletion is not arbitrary deletion. It relies on rule matching, so you must observe the structure of the folder names before operation. Only when the naming pattern is clear can batch processing be both efficient and safe.

Result Preview: Before and After Batch Deleting Three-Digit Numbers

Before Processing: Three-Digit Numbers Needing Deletion Exist in Names

The image below shows the folder list before processing. At the end of each folder name is a three-digit number; the parts marked in red are the keywords to be deleted this time. Their specific numbers differ but all share the common feature of being three consecutive digits.

image-Batch fuzzy delete folder names,regex find and replace folder names,delete folder name keywords

Using ordinary search methods might require separately processing 812, 293, 376, 194, 705. This is not only cumbersome to set up but also unsuitable for larger numbers of folders. The advantage of regular expressions is precisely the ability to cover a class of text with a single rule.

After Processing: Numeric Keywords in Folder Names Have Been Deleted

After processing is complete, the folder names become INV4X, ORD7A, PO9C, REQ8F, SO2D. You can see the software deleted the three-digit numbers matching the rule while preserving the valid earlier part of the name.

image-Batch fuzzy delete folder names,regex find and replace folder names,delete folder name keywords

This processing result is suitable for subsequent archiving, retrieval, and sharing. The names are shorter, the structure is more uniform, and meaningless identifiers are prevented from affecting human recognition.

Operation Steps: Using Regular Expressions to Find and Replace Keywords in Folder Names

Step 1: Select the Folder Name Processing Feature in the Software

Open HeSoft Doc Batch Tool and select "Folder Name" in the left function area. As seen in the screenshot, this category provides multiple folder name-related functions. This tutorial uses "Find and replace keywords in folder names," whose description is to batch find and replace keywords in the folder names of files.

image-Batch fuzzy delete folder names,regex find and replace folder names,delete folder name keywords

The purpose of selecting this function is to have the software find content in folder names according to specified rules and then perform a replacement. Since replacing with nothing achieves deletion, it is very suitable for the requirement of "batch fuzzy deletion of folder name keywords."

Step 2: Add the Folders to Be Processed to the Record List

After entering the feature page, first select the records that need processing. Click "Add Folder" in the upper right corner to add the folders you intend to batch rename to the list. The screenshot shows 5 records, named INV4X812, ORD7A293, PO9C376, REQ8F194, SO2D705, respectively.

image-Batch fuzzy delete folder names,regex find and replace folder names,delete folder name keywords

After adding them, do not rush to the next step. It is recommended to check the names and paths in the table to confirm that these folders indeed fall within the current processing scope. The table also displays information like creation time and modification time, which helps determine if the correct directories have been selected. After confirmation, click "Next" at the bottom.

The first principle of batch processing is to confirm the objects first, then configure the rules. Choosing the wrong objects, even with correct rules, can affect folders that shouldn't be modified. Exercise caution, especially when handling client data, contract files, and project delivery directories.

Step 3: Enable Formula Fuzzy Text Search

Entering the "Set Processing Options" page, select "Use formula fuzzy text search" in the "Search Method." As seen in the screenshot, this option is selected. Compared with "Exact text search," formula fuzzy search is more suitable for handling variable content, such as different numbers, identifiers, or character segments with fixed formats.

image-Batch fuzzy delete folder names,regex find and replace folder names,delete folder name keywords

In this case, the content to be deleted is not a single fixed keyword but multiple different three-digit numbers. Therefore, choosing the fuzzy search method is a key step. If exact search were still used here, one rule could not cover all the identifiers.

Step 4: Enter \d{3} in the Keyword List

Enter \d{3} in the "Keyword list to find" on the left. This expression is used to match three consecutive digits. Referring to the pre-processing screenshot, it can match 812, 293, 376, 194, 705 in the folder names.

Pay attention to character integrity when entering the rule, especially the combination of the backslash, the letter d, the curly braces, and the number 3. An incorrectly written rule might fail to match content or match an unintended range. It is recommended to test on a small number of folders first and proceed to a larger scope only after confirming the results are correct.

Step 5: Leave the Replacement Content Blank to Achieve Deletion

The right area is the "Replaced keyword list." The screenshot shows a prompt stating "Leaving blank means deletion," so keeping this area blank achieves the goal. With this setting, the software will replace the content matched by the left rule with nothing, ultimately resulting in the deletion of these numbers from the folder names.

This step is a common point of confusion for many users: deletion does not necessarily require entering a "delete" command. In find-and-replace logic, replacing the target content with empty content constitutes deletion. As long as the interface prompt supports "Leaving blank means deletion," keeping the right side empty is the correct practice.

Step 6: Follow the Wizard to Set the Save Location and Start Processing

After completing the rule setup, click "Next" at the bottom. The top progress bar shows subsequent steps including "Set save location" and "Start processing." Continue confirming according to the interface wizard and initiate the processing. Once processing is done, go to the directory where the folders are located to check the name changes.

If you ultimately see INV4X812 changed to INV4X and ORD7A293 changed to ORD7A, it means the regex find-and-replace has been successfully executed. For more folders, the processing logic remains the same.

Common Questions and Precautions: Avoiding Misoperations During Batch Deletion

1. What is the relationship between regular expressions and wildcards?

In office scenarios, many users understand wildcards, formulas, and regular expressions as "fuzzy search based on rules." From the screenshots in this tutorial, the software provides the "Use formula fuzzy text search" option. In practical use, rules like \d{3} can match a class of text, rather than just matching a fixed string.

2. Is leaving the right side blank necessarily safe?

Leaving the right side blank means deleting the matched content, but its safety depends on whether the left-side rule is accurate. If the left-side rule's match scope is too broad, it might delete content that shouldn't be deleted. Therefore, what truly requires caution is the search rule itself, not just whether the replacement box is empty.

3. How to reduce the risk of batch renaming?

A three-step check is recommended: first check the list of folders to be processed, then check the expression rules, and finally check the replacement content. For important directories, you can copy a small subset of samples for testing first. Only after confirming the processing results match expectations should you proceed with the complete folder set.

4. Is this method only applicable to folders?

This article demonstrates folder name processing, and the features in the screenshots are located under the "Folder Name" category. If you also need to organize file names for Word, doc, docx, Excel, PDF, etc., you can select the appropriate file name or document processing tool in the software according to its corresponding category. The entry points for different objects may differ; operations should be based on the functions displayed in the interface.

Summary: Master Rule Matching to Save Time in Batch Folder Organization

The key to batch fuzzy deletion of keywords in folder names lies in translating "what to delete" into an executable rule. In the example in this article, although the trailing identifiers vary, they all belong to the category of three consecutive digits, and thus \d{3} can be used for unified matching, with deletion achieved by leaving the replacement content blank.

Through HeSoft Doc Batch Tool , you can complete the operation by following the workflow: select folder name function, add folders, set formula fuzzy search, enter regular expression, replace with blank, and start processing. For users who need to regularly organize a large number of folders and office materials, this batch processing method can significantly reduce repetitive labor, make directory naming more standardized, and make file management work more efficient. It is recommended that the next time you encounter similar needs for identifier cleanup, keyword deletion, or directory name standardization, you prioritize using rule-based batch processing methods.


Keyword:Batch fuzzy delete folder names , regex find and replace folder names , delete folder name keywords
Creation Time:2026-07-01 06:22:33

Disclaimer: All images, text, and video content on the website are for reference only and may not be the latest, correct, or accurate. In case of any dispute, please refer to the actual experience effect!

Related Articles

Don't see the feature you want?

Provide us with your feedback, and after evaluation, we will implement it for free!