Method for batch modifying similar text in folder names: One-click replacement of duplicate numbers using regex


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-05-08 14:48:52

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 a large number of folder names contain similar numbers, dates, version numbers, or fixed-format characters, renaming them one by one is not only time-consuming but also prone to omissions. This article uses HeSoft Doc Batch Tool as an example to demonstrate how to use the "Find and Replace Keywords in Folder Names" function. By employing a formula-based fuzzy search, it can batch locate three-digit numbers in folder names and uniformly replace them with specified text, enabling batch modification and standardized management of folder names.

In project materials, customer archives, order folders, or test data directories, it is common to encounter a batch of folder names with similar structures, such as INV4X812, ORD7A293, PO9C376. Their prefixes differ, but they all end with three digits. If you need to uniformly replace these similar identifiers with fixed text, manually modifying each folder name would be very inefficient.

This article describes how to use office software HeSoft Doc Batch Tool to batch modify similar text in folder names using "Folder Name" related functions. In the example, we will batch replace the three digits at the end of folder names with -TEST, thus quickly completing batch folder renaming.

Applicable Scenarios

Batch modifying similar text in folder names is suitable for the following common office scenarios:

  • Batch replace identifiers: For example, uniformly replace order numbers, serial numbers, or test codes in folder names with specified text.
  • Unify project directory naming: Replace old identifiers in multiple project folders with new ones to maintain directory naming conventions.
  • Batch process dates or version numbers: For example, uniformly adjust dates, version suffixes, or phase markers in folder names.
  • Organize customer or material folders: When folder names contain characters in a similar format, batch renaming can be completed in one go.

If you usually need to batch process Word, docx, doc, Excel, PDF, or image materials, using such office batch processing tools can reduce a lot of repetitive operations.

Effect Preview: Before and After Processing

Before Processing

image-Batch modify folder names,batch replace folder names,batch rename folders,modify folder names with regular expressions

The folder names in the example are as follows:

  • INV4X812
  • ORD7A293
  • PO9C376
  • REQ8F194
  • SO2D705

The commonality among these names is that each folder name ends with three digits, such as 812, 293, 376, 194, 705.

After Processing

image-Batch modify folder names,batch replace folder names,batch rename folders,modify folder names with regular expressions

After batch replacement is complete, the folder names become:

  • INV4X-TEST
  • ORD7A-TEST
  • PO9C-TEST
  • REQ8F-TEST
  • SO2D-TEST

As you can see, the original three-digit endings have been uniformly replaced with -TEST. This is the typical effect of batch finding and replacing similar text in folder names.

Operation Steps

Step 1: Enter the "Folder Name" tool category

Open HeSoft Doc Batch Tool , then select Folder Name in the left function bar. The interface will display several tools related to folder naming, including:

  • Find and replace keywords in folder names
  • Insert text into folder names
  • Add prefixes and suffixes to folder names
  • Change case of folder names
  • Delete text from folder names

For this example, we want to batch modify similar numeric identifiers in folder names, so select "Find and replace keywords in folder names".

image-Batch modify folder names,batch replace folder names,batch rename folders,modify folder names with regular expressions

Operation Purpose: Enter the function module specifically for batch replacing text in folder names.

Expected Result: The software enters the batch processing wizard page, ready to add the folders that need processing.

Step 2: Add folders that need batch renaming

After entering the function page, click the "Add Folder" button in the upper right corner to import the folders whose names need to be modified into the software.

After importing, the list will display information such as the folder's serial number, name, path, creation time, and modification time. The example added 5 folders with names INV4X812, ORD7A293, PO9C376, REQ8F194, SO2D705.

If you imported folders that do not need processing, you can remove them using the delete action on the right side of the list; if the list is too long, you can also use the filtering and sorting functions on the interface to assist in viewing.

image-Batch modify folder names,batch replace folder names,batch rename folders,modify folder names with regular expressions

Operation Purpose: Confirm the scope of folders that need batch name modification this time.

Expected Result: All folders to be processed appear in the list, with the correct record count, then click "Next" to enter the processing option settings.

Step 3: Select "Use formula for fuzzy text search"

On the "Set Processing Options" page, find the Search Method. Here you can see options like "Exact text search" and "Use formula for fuzzy text search".

Since the three digits at the end of each folder in this example are different, using exact search would require entering specific content like 812, 293, 376, etc., which is not efficient. Therefore, you should select "Use formula for fuzzy text search".

image-Batch modify folder names,batch replace folder names,batch rename folders,modify folder names with regular expressions

Operation Purpose: Match text with similar formats using rules, rather than just matching one specific fixed text.

Expected Result: The software can identify content in folder names that matches the rules, such as the three digits in this example.

Step 4: Fill in the keyword rule to find

In the left "Keyword List to Find", fill in:

\d{3}

This rule indicates matching three consecutive digits. For INV4X812, it will match 812; for ORD7A293, it will match 293.

Operation Purpose: Let the software batch find identifiers with similar formats in the folder names.

Expected Result: All parts of the folder names matching the "three digits" rule will be identified.

Step 5: Fill in the replacement keywords

In the right "Replacement Keyword List", fill in:

-TEST

This means uniformly replacing the found three-digit numbers with -TEST. For example:

  • INV4X812 will become INV4X-TEST
  • ORD7A293 will become ORD7A-TEST
  • PO9C376 will become PO9C-TEST

The interface prompts also note that if the replacement content is left empty, it means deleting the matched text. That is, if you only want to delete certain similar characters in folder names, you can leave the replacement list blank.

Operation Purpose: Specify the new text after the batch replacement.

Expected Result: The software will batch generate new folder names according to the "Search Rule + Replacement Text" method.

Step 6: Continue to next step and start processing

After setting the search and replacement content, click the "Next" button at the bottom of the page. Continue through the subsequent steps according to the interface wizard, such as setting the save location, and enter the Start Processing phase.

After processing is complete, go back to the folder's location to check the results, and you will see that the folder names originally ending with three digits have been batch modified to new names with the -TEST suffix.

Operation Purpose: Execute the task of batch modifying folder names.

Expected Result: Multiple folder names are replaced at once, without the need for manual individual renaming.

Frequently Asked Questions and Notes

1. Why use formula for fuzzy search?

When the similar text in folder names is not exactly the same but has the same format, it is suitable to use formula for fuzzy search. For example, 812, 293, 376 in this example are all different, but they all belong to "three digits," so they can be matched in one go using \d{3}.

2. What if I only want to delete the similar text?

From the interface description, if the replacement keyword list is left empty, it means deletion. In other words, after filling in the content to find, leave the replacement content blank to batch delete the matched text from the folder names.

3. Should I check the list before batch modification?

It is recommended to always check. Batch processing is very efficient, but it also means that a setup error can affect multiple folders simultaneously. Before starting processing, confirm that the number, names, and paths of imported folders are correct to avoid mistakenly modifying unrelated directories.

4. How to write rules more safely?

If you only want to replace the ending identifier, make the rule as close to the target content as possible to avoid matching numbers in the folder name that you do not want to modify. This example demonstrates matching three digits, suitable for cases where only the target three digits need replacement in the name.

5. Is this suitable for processing files or folders?

This article demonstrates the batch modification of folder names. If you need to batch process file names of Word documents, docx, doc, Excel spreadsheets, PDF files, or image files, you can find related batch processing functions in the corresponding tool categories on the left side of the software.

Summary

The key to batch modifying similar text in folder names is to first find the common pattern in these names, and then use office software to perform the replacement in batch. Through the "Find and replace keywords in folder names" function of HeSoft Doc Batch Tool , you can quickly import multiple folders, use formula for fuzzy search to match similar identifiers, and uniformly replace them with specified text.

For those who frequently need to organize project directories, customer materials, order folders, or test data, this batch processing method can significantly reduce repetitive work and lower the probability of manual renaming errors. It is recommended to confirm the folder list and replacement rules before official processing, and proceed to the next step to start batch processing only after confirming correctness.


Keyword:Batch modify folder names , batch replace folder names , batch rename folders , modify folder names with regular expressions
Creation Time:2026-05-08 14:37:11

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!