Tutorial on batch deleting the middle content of folder names by start and end keywords


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-10-13 07:06:55
Content note: This article reflects the software version available when it was published. Interfaces and features may change with updates; please refer to the current software. If you find an error, please let us know.
Software featured in this articleHeSoft Doc Batch Tool
Free DownloadSoftware IntroductionUser Guide

When you need to keep the text at both ends of folder names and only delete version numbers, notes, or batch text between certain start and end keywords, you can use a boundary-based batch deletion method. This article uses multiple project directories as an example to demonstrate how to select the delete function in folder name batch processing software, import records, set START and _END as the left and right text, and turn off the option to include the boundaries, thereby obtaining a unified START_END naming result. It also provides a pre-execution checklist, suggestions for handling unusual names, and methods for verifying the results.

Many teams keep the project name, processing stage, and final status in folder names, while placing version numbers, batches, and temporary notes in the middle. Such naming is convenient for distinguishing items during a project, but when archiving, delivering, or sharing externally, the middle information may need to be removed uniformly. The problem is that the middle text in each folder often differs: some contain alpha, some contain 2024Draft, some contain batch001, and others may contain a longer note. Deleting them one by one is not only slow, but also makes it difficult to ensure that every name follows the same format.

For this kind of structured naming, the deletion range can be determined by "start and end keywords." That is, specify a left text and a right text, and let the software batch delete everything between them. This article uses START and _END as the boundaries, and completes the operation through HeSoft Doc Batch Tool . This software is an office batch-processing tool whose main value is batch processing of files and folders to reduce repetitive work. For users who need to organize large numbers of project directories, client folders, design draft directories, or archive directories for Word, doc, docx, Excel, xlsx, PPT, and PDF materials, this rule-based approach is more suitable for long-term use than manual renaming.

1. What problem does this article solve

This article addresses the following specific goal: a folder name contains two known texts, and you need to keep the content at both ends of the name while batch deleting the changing characters between the two texts.

The example names follow this form:

Project or material type_START_temporary content_END_processing status

The goal is to uniformly convert them into:

Project or material type_START_END_processing status

There are three key conditions here. First, the processing target is folder names. Second, the left and right boundaries can be found in the names. Third, the text to be deleted is located between the boundaries. As long as these conditions are met, the same rule can be used to complete the batch operation even if the middle content has different lengths.

2. Applicable scenarios

1. Removing version information during project archiving

During project execution, directories such as alpha, beta, oldVersion, or 2024Draft may be created. After the project is completed, if you still need to keep the preceding project category and the following archive status, you can delete only the version range.

2. Clearing internal notes when delivering materials

Internal folder names may contain information such as privateText, removeThis, or debugInfo that is not suitable for external display. Using unified boundaries for batch deletion can reduce the workload of checking each item individually, but manual spot checks should still be performed after execution.

3. Cleaning up batch numbers after batch tasks end

Ticket, data import, or image processing tasks are often named by batch001, batch002, and so on. After consolidation is completed, the batch field can be deleted while retaining final statuses such as Paid, Clean, and Edited.

4. Unifying directory names of different lengths

Ordinary fixed-character replacement requires the text to be replaced to be consistent, while boundary deletion does not require the middle text to be the same. Therefore, when the middle fields vary in length, locating them by two texts is more convenient.

3. Preview before processing and analysis of name structure

The screenshot before processing lists multiple folders including Backup, Build, Client, Data, Design, Invoice, Notes, Photo, Project, and Task. Each name contains START and _END, and the middle part is the content to be deleted this time.

image-Delete folder names by keyword,batch delete middle content,folder name batch processing,folder batch rename tutorial

For example:

  • Backup_START_tempFiles_END_Final: the tempFiles-related range needs to be deleted.
  • Build_START_debugInfo_END_Release: the debugInfo-related range needs to be deleted.
  • Client_START_2024Draft_END_Archive: the 2024Draft-related range needs to be deleted.
  • Design_START_oldVersion_END_Approved: the oldVersion-related range needs to be deleted.
  • Project_START_alpha_END_Report: the alpha-related range needs to be deleted.

These contents to be deleted are different from each other, so it is not possible to simply replace one specific word with empty. The correct approach is to treat START as the left locating text, _END as the right locating text, and then uniformly clear the middle range. The red markers point exactly to this kind of dynamic content.

4. Preview after processing and result evaluation

After batch processing is executed, the dynamic text in the original names has been removed, and the directory names have been transformed into a more uniform form.

image-Delete folder names by keyword,batch delete middle content,folder name batch processing,folder batch rename tutorial

The results shown in the screenshot include:

  • Backup_START_END_Final
  • Build_START_END_Release
  • Client_START_END_Archive
  • Data_START_END_Clean
  • Design_START_END_Approved
  • Invoice_START_END_Paid
  • Notes_START_END_Public
  • Photo_START_END_Edited
  • Project_START_END_Report
  • Task_START_END_Done

To determine whether the results are correct, you can observe three aspects: whether the beginning of the name is still retained, whether the START and END markers meet expectations, and whether statuses such as Final, Release, and Archive at the end of the name remain unchanged. If all three parts are correct, the deletion range has been set properly.

5. Detailed operation steps

Step 1: Open "Delete text in folder names"

Open HeSoft Doc Batch Tool . The left navigation bar contains file names, folder names, file organization, and various office document tools. Because this task requires modifying folders rather than files, click "Folder Names." In the function cards, select "Delete text in folder names."

image-Delete folder names by keyword,batch delete middle content,folder name batch processing,folder batch rename tutorial

After selection, you will enter a separate processing wizard. The top of the page shows four stages: "Select records to process," "Set processing options," "Set save location," and "Start processing." This step-by-step flow helps you first determine the target, then establish the rules, and finally execute the task, avoiding mixing the selection range with the processing conditions.

Step 2: Add and filter the records to be processed

In the "Select records to process" stage, click "Add Folder." After adding the folders you intend to rename, the list will display each record's name, path, creation time, and modification time.

image-Delete folder names by keyword,batch delete middle content,folder name batch processing,folder batch rename tutorial

In the example list there are 10 records in total, all located under the displayed test path. In actual operation, users should not only look at the folder names, but also verify the full paths. Folders with the same name may exist in different locations. If you mistakenly select another project directory, the batch rule will also be applied to it.

The delete icon in the operation column can be used to exclude a record that does not need to be processed. The interface also provides "Filter" and "Sort," which can be used to assist in reviewing the list; the specific usage should follow the current software interface. If the entire list is selected incorrectly, you can click "Clear" and add again. After confirming there are no errors, click "Next" at the bottom.

Step 3: Choose deletion between two texts

After entering "Set processing options," you can see various operation types such as all numbers, all spaces, the rightmost several texts, all content to the left or right of a certain text, and position ranges. In this example, select "All content between two texts."

image-Delete folder names by keyword,batch delete middle content,folder name batch processing,folder batch rename tutorial

Then fill in:

  1. Left text: START
  2. Right text: _END

The two fields are marked as required, meaning the boundary information cannot be empty. When entering, use half-width English characters, and confirm that the right text includes the underscore. If the original names use other symbols, fill them in according to the actual names rather than mechanically copying the example.

Step 4: Set whether to delete the boundary keywords

Below the left and right text input boxes, there are switches for "Include left text" and "Include right text." They determine whether the deletion range includes the locating keywords themselves.

To obtain the START_END structure shown in the post-processing screenshot, keep both switches off. In this case, the software deletes only the content between START and _END, without deleting START or _END. You can verify this with "Project_START_alpha_END_Report": after clearing the middle range, the result is "Project_START_END_Report".

If your actual business requires START to be removed as well, or if you do not want to keep the END marker, you need to reevaluate the switch settings and boundary wording. Do not process all directories directly without understanding the result. The safest approach is to first create a few copies, test them separately on sample data, and then determine the formal rule.

Step 5: Set the save location

After completing the rules, click "Next" to enter "Set save location." At this stage, determine the result location according to the actual options provided by the software interface, and confirm that the target directory has normal access permissions. For important materials, it is recommended to keep an unprocessed copy so that you can restore or reconfigure if the naming results do not meet expectations.

Also note that changes to folder names may cause existing shortcuts, script paths, document hyperlinks, or synchronization tasks to become invalid. If these directories are referenced by other business processes, record the correspondence between old and new names first, and notify relevant users.

Step 6: Start batch processing

After completing the save settings, enter "Start processing" and execute the task according to the interface prompts. During processing, do not manually modify these directories in File Explorer at the same time, and close programs that are currently accessing the target folders as much as possible. This can reduce interference caused by path occupation or name changes.

After processing is complete, do not only confirm that the software task has finished. Also open the actual directories to verify the results. It is recommended to compare the number of records, the number of processed folders, and the expected names. In the example, there were 10 records before processing, and the corresponding 10 directories should still be found after processing.

6. Pre-execution checklist

To reduce the risk of batch renaming, you can complete the following checks before clicking Start Processing:

  • Whether all target names contain both the left text and the right text.
  • Whether the capitalization and symbols of START and _END are exactly the same as in the original names.
  • Whether the two "include" switches match the expected results.
  • Whether deleting the range will produce empty names or incomplete names.
  • Whether folders with the same name may be generated in the same path.
  • Whether the directories to be processed are occupied by Word, Excel, File Explorer, synchronization tools, or other programs.
  • Whether backups or test copies have been created for important materials.
  • Whether the save location matches the current task arrangement.

Batch processing itself can save a great deal of time, but its efficiency advantage can only truly be realized when the rules are accurate. Spending a few minutes on checks is usually more cost-effective than correcting items one by one after processing.

7. Common questions and precautions

1. What happens if there is no content between the left and right texts?

If the name is already START_END, meaning there are no extra characters between the two boundaries, then it may already conform to the target format. To avoid unnecessary operations, you can exclude such records when adding them to the list, or first confirm through testing how the software actually handles such names.

2. What should I do if there is only a left text but no right text?

Such a name does not satisfy the complete condition of "between two texts." Do not arbitrarily shorten the boundary just to cover it, as that may affect other normal names. It is recommended to sort out abnormal records separately, and then choose a rule suitable for their structure.

3. What if a name contains multiple sets of the same boundaries?

Multiple sets of boundaries may make the matching range unclear. You should first copy that name for a single test and observe the actual result. If the target range can be defined by more complete and more unique text, prioritize using unique boundaries.

4. Why not directly use find and replace?

When the middle text is exactly the same, find and replace may also meet the need; however, in the examples in this article, contents such as tempFiles, debugInfo, alpha, and batch001 are not the same. Using left and right keyword positioning allows one rule to cover multiple kinds of middle text and reduces rule maintenance.

5. Will batch renaming delete the materials inside the folders?

The function described in this article targets folder names. The processing target is the characters in the names, not actively deleting folder contents. However, any batch renaming may affect programs that depend on old paths, so backups and path reference checks are still necessary.

6. Can Chinese boundaries be processed?

Whether it is suitable depends on the actual name structure. In principle, the boundary should be text that actually exists in the folder names and is sufficiently stable. Regardless of whether it is Chinese, English, numbers, or combined symbols, the matching result should first be confirmed with a small number of samples, rather than judged solely by character type.

8. How to verify batch processing results

After the task is completed, you can use the three-step acceptance method of "quantity check, name spot check, and path access." First, verify the number of folders before and after processing to confirm that nothing is missing; second, spot-check multiple names at the beginning, end, and middle of the list, especially records containing numbers, long text, and special characters; finally, open several processed folders to confirm that the files inside can be accessed normally.

If the directories are used for team sharing, also check whether common shortcuts or business systems can still locate the new paths. If abnormalities occur, suspend subsequent tasks and return to the test copies to analyze the boundary settings, rather than continuing to expand the processing scope.

9. Summary

Batch deleting the middle content of folder names by start and end keywords is suitable for directories where the middle fields are not fixed but the left and right boundaries are consistent. In the example in this article, select "Delete text in folder names" in HeSoft Doc Batch Tool , add 10 folders, then select "All content between two texts," set START and _END as the left and right texts respectively, and turn off the two switches for including boundaries, ultimately removing all kinds of temporary content uniformly.

Compared with renaming one by one, the batch processing method of office software can significantly reduce repeated input while keeping naming rules consistent. It is recommended to first copy a small number of directories for a trial run, confirm that the START_END output structure, save location, and file access are all normal, and then process the complete materials. For folders with different structures, tasks should be created in groups, and one rule should not be forced to cover all situations.


Keyword:Delete folder names by keyword , batch delete middle content , folder name batch processing , folder batch rename tutorial
Creation Time:2026-10-13 07:06:39
Software featured in this articleHeSoft Doc Batch Tool
Free DownloadSoftware IntroductionUser Guide
Content note: This article reflects the software version available when it was published. Interfaces and features may change with updates; please refer to the current software. If you find an error, please let us know.