How to batch remove the middle field from folder names containing a fixed delimiter while preserving the content before and after it


Translation:EnglishFrançaisDeutschEspañol日本語한국어
Update Time:2026-10-13 07:08:56
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

The project directory often uses fixed delimiters to enclose version numbers, batch numbers, internal notes, or temporary tags. When archiving, if these fields are deleted one by one, the workload is large and the names before and after are easily damaged. This article introduces a method to batch clean folder names by left and right boundaries: use START and _END to locate the deletion range, retain the delimiter markers and the valid information before and after, and combine the operation interface to explain the complete process of adding directories, setting rules, checking switches, and verifying results.

Many teams combine business names, internal fields, and processing status into the same folder name when creating working directories. For example, "Client_START_2024Draft_END_Archive" contains both the customer or project identifier and the draft year and archive status. This naming approach is convenient during the material circulation stage, but when it comes to formal archiving, external distribution, or unified delivery, the internal fields located between fixed delimiters often need to be removed.

If the content in the middle of each folder is different, ordinary word replacement is not practical: texts such as tempFiles, debugInfo, 2024Draft, batch001, and alpha cannot be handled by creating replacement rules one by one. A more suitable method is to treat START as the left boundary and _END as the right boundary, and batch delete all content between the two texts. This article will explain how to complete this task using the operation interface of HeSoft Doc Batch Tool . The product is positioned as batch processing software for office files, suitable for centrally processing a large number of files or folders and reducing the time consumed by repeated clicking, manual input, and item-by-item checking.

1. When is it suitable to delete content based on two text boundaries

This processing method does not require the text to be deleted to be identical, but it does require folder names to have a recognizable structure. You can first observe the names and determine whether there are stable start and end markers.

For example, a batch of directories follows the following rule:

BusinessName_START_field_to_delete_END_retained_status

Here, the "field to delete" may be letters, numbers, Chinese characters, or mixed text of any length. As long as START and _END exist at the left and right ends respectively, it can be located by boundaries without worrying about what exactly is written in between.

Common application scenarios include:

  • Removing internal code names from the development, testing, or draft stages during project archiving.
  • Clearing internal-use-only remark fields before customer materials are sent externally.
  • Removing batch numbers, operator abbreviations, and temporary serial information when organizing financial or administrative directories.
  • Removing process labels such as oldVersion and rawSet after design materials are finalized.
  • Clearing intermediate fields appended to folder names by the source system after data migration is completed.
  • Unifying the naming format of multiple historical directories to make the positions of retained information clearer.

If names do not have stable boundaries, or if different folders use completely different delimiter rules, they should be classified first, and then rules should be set in batches. Placing directories with very different structures into the same task may increase the risk of incorrect processing.

2. Before and after comparison: intermediate fields are deleted, and the preceding and following names are retained

1. Before processing: intermediate field content differs

The screenshot below before processing shows 10 folders. They all contain START and _END, but the content between the two boundaries is different. The red lines mark the text areas that need to be deleted.

image-Batch folder name cleaning,batch deletion of middle characters,renaming with fixed delimiters,bulk folder renaming tool

From the naming structure, this batch of directories has three characteristics:

  1. Texts such as Backup, Build, Client, and Data before START need to be retained.
  2. Content such as tempFiles, debugInfo, and 2024Draft between START and _END needs to be deleted.
  3. Statuses such as Final, Release, Archive, and Clean after _END still have business meaning and also need to be retained.

Because the length of the intermediate fields is not fixed, deleting by character position, for example uniformly deleting characters 10 through 20, may cut off boundaries or suffixes. Using two texts as range boundaries can more accurately adapt to names of different lengths.

2. After processing: a unified and concise directory structure is formed

After batch processing is completed, the intermediate fields have been cleared. START and END still exist, and the business information before and after the folder names has not been deleted by the target rule.

image-Batch folder name cleaning,batch deletion of middle characters,renaming with fixed delimiters,bulk folder renaming tool

For example:

  • Design_START_oldVersion_END_Approved becomes Design_START_END_Approved.
  • Notes_START_privateText_END_Public becomes Notes_START_END_Public.
  • Photo_START_rawSet_END_Edited becomes Photo_START_END_Edited.
  • Task_START_removeThis_END_Done becomes Task_START_END_Done.

The reason it is displayed here as START_END is that the right boundary is set to "_END", and the underscore before the intermediate field is not separately treated as a retained character, while START itself and _END in the right boundary are retained. When setting boundaries, underscores, spaces, or hyphens should be regarded as part of the naming rule, not just readable words.

3. Complete operation process

Step 1: Select the delete text function in the folder name tool

After starting HeSoft Doc Batch Tool , enter "Folder Name" from the left navigation. The main area will display multiple function entries related to batch folder renaming, including find and replace, insert text, add prefix and suffix, case conversion, and delete text.

image-Batch folder name cleaning,batch deletion of middle characters,renaming with fixed delimiters,bulk folder renaming tool

In this example, click "Delete text in folder names". This entry directly corresponds to the goal of this article: batch remove unwanted characters from multiple folder names according to specified conditions. After selection, you will enter a step-by-step task page, and the top of the page shows stages such as select records, set processing options, set save location, and start processing.

If the actual need is only to replace a fixed word with another word, find and replace should be considered; but in this example, the intermediate field of each folder is different, so deleting based on two text boundaries is more appropriate.

Step 2: Create the list of folders to be processed

After entering the task, you are first in the "Select records to process" stage. Click "Add Folder" in the upper right corner to add the target directories to the list. The example list shows 10 folders and their paths, creation times, modification times, and other information.

image-Batch folder name cleaning,batch deletion of middle characters,renaming with fixed delimiters,bulk folder renaming tool

After adding, you should review the "Name" and "Path" columns row by row. The name is used to confirm whether START and _END exist, and the path is used to prevent confusing test directories with official directories. If a record is not the processing target of this batch, you can click the delete icon in its operation column to remove it from the current task; if you need to reselect, you can also use the "Clear" option provided in the interface to reorganize the list.

The bottom of the example page shows "Record count: 10". In batch tasks, the number of records is an important basis for review. If 10 directories are expected to be processed but the page shows only 9 or more than 10, you should first go back to the file manager to check for omissions, duplicates, or incorrect selections. After confirming the list is correct, click "Next".

Step 3: Use left and right texts to define the deletion range

On the "Set processing options" page, select "All content between two texts". The purpose of this option is to let the software determine the range through two known texts, rather than deleting according to content type or fixed position.

image-Batch folder name cleaning,batch deletion of middle characters,renaming with fixed delimiters,bulk folder renaming tool

Fill in according to the example names:

  • Enter START in "Left text".
  • Enter _END in "Right text".

Both fields have required markers, indicating that both left and right boundaries must be provided. After filling in, you can verify the rule in your mind using a real name: for "Data_START_sampleChunk_END_Clean", the left boundary is START and the right boundary is _END. The "_sampleChunk" between them belongs to the area to be deleted, and the result after processing is "Data_START_END_Clean".

Do not ignore symbols when verifying. The right text is set to "_END" rather than "END" so that the matching condition is consistent with the actual names in the example. If the directories use "-END", " END", or other forms, you should fill them in according to the actual names and not copy the example directly.

Step 4: Set whether boundaries are included in the deletion range

"Include left text" and "Include right text" determine whether the boundaries themselves are deleted. In the example screenshot, both switches are not enabled, so START and _END are not deletion targets, and only the content between them will be cleared.

Three common needs can be distinguished:

  • Delete only the middle content: both inclusion switches are off, consistent with the example in this article.
  • Delete the middle content and the left boundary: enable the setting to include the left text according to the interface meaning, but it must be tested before execution.
  • Delete the middle content and the right boundary: enable the setting to include the right text according to the interface meaning, and likewise check sample results first.

If you want the final names to not retain START and END at all, you need to carefully evaluate how the two boundaries and nearby delimiters are combined. To avoid consecutive underscores, extra spaces, or text sticking together before and after, it is recommended to process a few copies first, confirm the results, and then expand the scope.

Step 5: Continue the subsequent process and execute the processing

After confirming the processing options, click "Next" and continue according to the task stages shown in the interface. The process at the top of the page indicates that the subsequent stages also include setting the save location and starting processing. When entering each stage, follow the actual prompts on the interface and verify the task objects and settings before executing.

Before starting batch renaming, it is recommended to make three preparations: close the applications that are browsing these folders; pause synchronization, backup, or upload tasks that may occupy the directories; save a copy of the original folder name list. For important projects, you can also first copy a small number of directories to a test location and run a trial with the same rules.

Step 6: Spot-check by structure rather than looking at only one result

After processing is completed, you should view the target directory and compare the results with the name structure before processing. It is recommended to spot-check at least the following types:

  • Names whose intermediate fields are ordinary English words, such as tempFiles.
  • Names whose intermediate fields contain numbers, such as 2024Draft and batch001.
  • Names with longer intermediate fields, such as sampleChunk and removeThis.
  • Records with longer prefixes and suffixes, to confirm that both ends have not been truncated.

If all samples appear as "original prefix_START_END_original suffix", it means the current boundaries and inclusion switches basically match the goal of this task. If the results contain extra symbols, you should review whether the left and right texts already include underscores or spaces, rather than continuing to batch modify directly on incorrect results.

4. Common problems in operation

1. Does this delete files or delete content in folders?

No. What this article demonstrates is deleting a section of text in folder names. The goal is to modify the directory name structure, not to delete the folders themselves, nor to clear doc, docx, xls, xlsx, pptx, PDF, images, or other office files inside the directories. When adding tasks, you should still carefully verify the function entry to ensure that you are entering the delete text function under "Folder Name".

2. Must the intermediate content of all folders be the same?

No. The value of this method lies in the fact that the intermediate fields can be different. As long as the left and right boundaries are consistent, the software can locate the range based on START and _END. If some directories use other boundaries, they should be grouped and processed separately.

3. Why do some names not match after entering START?

It may involve differences in capitalization, spaces, or symbols. For example, START, Start, and start are not completely identical texts in names; the delimiter forms of _END, END, and " END" are also different. You should compare the original names character by character, and if necessary copy the boundary text from the names.

4. Why is deletion by fixed position not recommended?

In the example, neither the business prefixes nor the intermediate field lengths are uniform. A fixed position may be correct for one name, but delete START, END, or suffix status on another name. Locating by two fixed texts is more suitable for folder names with varying lengths but consistent structures.

5. What path issues need attention after renaming?

Folder names are part of paths. If Word document links, Excel external references, scripts, shortcuts, synchronization software, or business systems record the original paths, related references may need to be updated after renaming. Therefore, before officially processing shared directories, project directories, and archive directories, you should confirm whether there are path dependencies and choose an appropriate time to execute.

6. What if START or END appears multiple times in a folder name?

Repeated boundaries may make the deletion range ambiguous. For such names, you should not directly execute them in large batches together with ordinary records. You can first filter out directories with repeated boundaries, copy a small number of samples for testing, confirm that the actual processing results of the software meet expectations, and then decide on the subsequent plan.

7. How can the risks of batch renaming be reduced?

Test first, verify again, and then execute in batch. Specifically, you can first back up the original names, select a small number of copies to add to the list, run them according to the same START and _END rules, and confirm that the switch states and symbol handling are correct. After executing on the official directories, spot-check multiple records from different positions rather than checking only the first item.

5. Summary

When folder names adopt the structure of "leading information + left boundary + temporary field + right boundary + trailing information", deleting based on two text boundaries is more efficient than renaming item by item. The example in this article uses HeSoft Doc Batch Tool to set START as the left text and _END as the right text, and turns off both "include" switches, thereby batch clearing the intermediate fields while retaining the boundaries and the content before and after the names.

This type of office batch processing is especially suitable for project archiving, customer material organization, version directory cleanup, and historical data standardization. It can compress many repeated operations of selecting, locating, deleting, and confirming into a single unified rule. It is recommended to first select several folder copies with the same naming structure and complete a test according to the steps in this article; after confirming that the processed names meet the standard, add all target directories to complete the batch cleanup in a more reliable way.

Keyword:Batch folder name cleaning , batch deletion of middle characters , renaming with fixed delimiters , bulk folder renaming tool
Creation Time:2026-10-13 07:08:40
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.