How to batch clean up numbers and random digits in folder names using wildcard rules


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-07-30 07:05: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!

Many office document directories, after being exported or archived, will have redundant content such as random numbers, serial numbers, or sequence codes mixed into the folder names. This article, with practical screenshots, introduces how to use HeSoft Doc Batch Tool to add directories to be processed in the folder name function, select to find and replace keywords in folder names, and use a formula to fuzzily search for the text input \d{3} while leaving the replacement content blank, thereby batch deleting three-digit numbers in folder names and quickly completing directory naming standardization.

When organizing folders, the most troublesome part is often not that individual directory names are irregular, but that a large number of directories have similar but not identical problems. For example, a batch of folders named INV4X812, ORD7A293, PO9C376, REQ8F194, SO2D705 have useful main names, but the last three digits are just export numbers or temporary markers that are not needed for archiving. If handled manually, you have to select, rename, delete numbers, and confirm one by one, which significantly reduces efficiency after dozens of repetitions.

This article will demonstrate a more suitable batch processing method for office use: using the folder name processing function in " HeSoft Doc Batch Tool " to batch fuzzy-find numerical keywords in folder names using wildcards or regular expression rules, and replace the matched content with empty strings. After reading, you will know which problems this method is suitable for solving and be able to complete the operation by following the screenshot sequence.

Applicable Scenario: Batch Deleting Fixed-Like but Unfixed Content in Folder Names

Ordinary find-and-replace is usually suitable for deleting fixed text, such as deleting the word "temp" from all folder names. However, redundant content in many office directories is not fixed text but follows a common pattern, like order number suffixes, project batch numbers, customer profile numbers, export serial numbers, date fragments, or version numbers. Each is different but can be described uniformly by rules.

The common pattern in this case is very clear: each folder name ends with three consecutive digits. For this situation, using the regular expression \d{3} is very appropriate. Here, \d represents a digit, and {3} means appearing consecutively 3 times, so it can match different numbers like 812, 293, 376, 194, 705, etc.

This batch processing method is suitable for the following office needs:

  • Batch delete numerical suffixes at the end of folder names to make directory names cleaner.
  • Clean up random numbers automatically appended to downloaded materials or system exports.
  • Standardize the naming format of project folders, contract folders, order folders, and customer folders.
  • Standardize upper-level folder directories before processing Word documents, docx files, Excel spreadsheets, and PDF materials.
  • Reduce repetitive renaming operations and lower the probability of manual input errors and missed processing.

Effect Preview: Folder Name Issues Before Processing

From the screenshot before processing, it can be seen that the folder names are composed of "alphanumeric main body + three-digit suffix". The part marked in red is the content that needs to be deleted. Although each suffix number is different, they all follow the rule of three consecutive digits, so a single fuzzy search expression can be used for batch matching.

image-Batch cleanup folder numbers,wildcard delete folder names,folder batch rename tool

If done manually, you would need to change INV4X812 to INV4X, ORD7A293 to ORD7A, PO9C376 to PO9C, etc., one by one. Not only is this time-consuming with large amounts of data, but it can also cause folder name errors due to misreading digits or accidentally deleting main body characters.

Effect Preview: Only the Desired Main Name is Kept After Processing

After processing, the three digits in the folder names are deleted, leaving only the required main part of the directory. The screenshot shows that the original INV4X812 becomes INV4X, ORD7A293 becomes ORD7A, PO9C376 becomes PO9C, REQ8F194 becomes REQ8F, and SO2D705 becomes SO2D.

image-Batch cleanup folder numbers,wildcard delete folder names,folder batch rename tool

This is the deletion usage of "Find and Replace": finding keywords that match a rule and then leaving the replacement content empty. For cleaning up a large number of folder names, this is more stable than renaming one by one and easier to reuse the same set of rules.

Step 1: Selecting the Folder Name Function in the Office Software

Open " HeSoft Doc Batch Tool ". The left navigation bar contains multiple office processing categories, such as File Name, Folder Name, File Organization, Word Tools, Excel Tools, PowerPoint Tools, PDF Tools, Text Tools, Image Tools, etc. Since the object of this processing is the name of the folders themselves, you should click Folder Name on the left.

Under the Folder Name category, select Find and Replace Keywords in Folder Names. The screenshot shows the function description as "Batch find and replace keywords in the folder names of files", suitable for making unified modifications to multiple folder names.

image-Batch cleanup folder numbers,wildcard delete folder names,folder batch rename tool

The expected result of this step is to enter the corresponding batch processing wizard. Choosing the correct function is very important: if you want to change file names, you should enter File Name-related functions; if you want to change folder names, you should use the tools under the Folder Name category.

Step 2: Adding the Folder Records to be Batch Processed

After entering the function page, the first step is to "Select records for processing". Click the Add Folder button at the top right to add the folders whose names need to be cleaned up to the list. The screenshot shows that 5 folders have been added, and the interface displays information such as folder name, path, creation time, and modification time.

image-Batch cleanup folder numbers,wildcard delete folder names,folder batch rename tool

Before starting to set the rules, it is recommended to check the list first. Focus on two points: first, whether all the names are folders that need processing; second, whether the paths are from the correct directory. The example shows the path is under D:\test\, indicating these directories belong to the same testing location. After confirming the records are correct, you can click Next at the bottom to enter the processing options settings.

If the list contains folders that should not be modified, they should be removed before processing. Batch renaming is efficient but requires accurate upfront selection of the scope. Adding unrelated directories to the task might lead to unnecessary name modifications.

Step 3: Setting Up the Fuzzy Search Rule to Match Three Consecutive Digits

After entering the "Set Processing Options" page, first focus on the "Find Method". The interface provides two methods: Exact Text Search and Use Formula for Fuzzy Text Search. Since the numbers to be deleted in this case are not a fixed set of characters, you should select Use Formula for Fuzzy Text Search.

image-Batch cleanup folder numbers,wildcard delete folder names,folder batch rename tool

Next, enter \d{3} in the "Keyword List to Find" on the left. This expression matches three consecutive digits. In the current example, 812, 293, 376, 194, 705 at the end of the folder names will all be matched.

On the right is the "Replacement Keyword List". The screenshot clearly prompts "Leave empty to delete", so do not enter any replacement content here and keep it blank. With this setup, the software will replace the matched three digits with empty strings, effectively deleting them from the folder names.

The purpose of this step is to transform "manually judging which characters to delete" into "letting the software match automatically according to rules". As long as the expression is set correctly, the same logic can batch-process whether there are 5 folders or 500 folders.

Step 4: Confirming the Save Location and Starting Processing

After setting the rules, click Next. According to the page flow, the subsequent steps involve "Set Save Location" and "Start Processing". Since the screenshot shows a step-by-step wizard, it is recommended to follow the interface prompts to complete subsequent confirmations. Before starting processing, double-check the find rule and replacement content again, especially confirming that the replacement keyword list is empty.

For batch modifications of folder names, it is advisable to follow a simple principle: verify with a small number of samples first before processing the complete directory. For example, you can add 5 test folders, confirm the deletion effect of \d{3} meets expectations, and then execute the same rule on a larger range of office document directories.

After processing is complete, return to File Explorer to check the folder names. If the names have become INV4X, ORD7A, PO9C, REQ8F, SO2D, it means the rule matching and replacement results are correct.

FAQ: What to Note When Using Wildcards and Regex to Delete Folder Keywords

1. Will the regular expression delete numbers from the main body of the folder name?

In this case, \d{3} was entered, which matches three consecutive digits. If the main body of the folder name also contains three consecutive digits, they could potentially be matched as well. Therefore, before actual use, observe the naming patterns and confirm whether the content to be deleted is uniquely identifiable. If necessary, test on a small set of samples first.

2. If I only want to delete the last three digits, do I need a stricter rule?

The expression shown in the screenshot is \d{3} and works for the sample data. In practical work, if three-digit numbers might appear elsewhere in the folder name, it is advisable to test cautiously first to ensure no accidental deletion occurs. This article does not expand on complex settings not shown in the screenshot, focusing instead on explaining the fuzzy search formula usage visible in the current interface.

3. Is leaving the replacement list empty the same as entering a space?

No, they are different. Leaving it empty means deleting the matched content. Entering a space might replace the digits with spaces, leading to imperceptible whitespace characters in the folder name. Therefore, when deletion is required, the replacement keyword list should be left empty.

4. Can this method process file names, docx, doc, xlsx, or pdf?

This article demonstrates folder name processing. The software also has categories for File Name, Word Tools, Excel Tools, PDF Tools, etc., on the left, but appropriate tools should be selected for different objects. To batch change file names, use the File Name related functions; to process Word or PDF content, use the corresponding document tools.

5. Can old paths still be relied upon after batch processing?

After the folder name changes, the original full path will also change. If other tables, shortcuts, scripts, or software configurations reference the old path, they need to be updated synchronously. Therefore, before processing important directories formally, it is recommended to back up or record the original names first.

Summary: Using Rule-based Batch Processing to Improve File Organization Efficiency

The key to batch-cleaning numbers and random digits in folder names lies not in deleting one specific character, but in identifying common patterns in the naming. By using the "Find and Replace Keywords in Folder Names" function of " HeSoft Doc Batch Tool ", selecting "Use Formula for Fuzzy Text Search", entering \d{3}, and leaving the replacement content empty, you can batch delete three consecutive digits from multiple folder names.

This approach is particularly suitable for organizing office materials, archiving projects, standardizing order directories, and cleaning up system export folders. Compared to manual one-by-one renaming, batch processing reduces repetitive labor, lowers the probability of operator error, and makes folder naming more consistent. If you also encounter problems with large numbers of folder names containing appended numbers, dates, or random digits, you can start by testing the rule on a few directories, and execute in batch after confirming it's correct, thus completing file organization work more efficiently.


Keyword:Batch cleanup folder numbers , wildcard delete folder names , folder batch rename tool
Creation Time:2026-07-30 07:05:18

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!