Batch delete the content between two specified texts in folder names, keeping the preceding and following identifiers unchanged


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-06-25 06:34:56

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 fixed start and end identifiers, such as START and _END, and the temporary numbers, version descriptions, or batch information in between need to be uniformly cleaned up, manually renaming them one by one is highly inefficient and error-prone. This article uses HeSoft Doc Batch Tool as an example to demonstrate how to batch delete all content between two text segments in folder names while preserving the identifiers on both sides, making it suitable for project archiving, data organization, customer folder standardization, and other scenarios.

In daily office work and document organization, folder names often become very long due to export systems, project collaboration, version management, or temporary annotations. For example, a folder name might be Backup_START_tempFiles_END_Final, where START and _END are fixed identifiers, and the middle tempFiles is just temporary content. If there are only a few such folders, manual modification is acceptable; but if there are dozens or hundreds, deleting the middle text one by one is not only time-consuming but also prone to deleting wrong characters, missing folders, or breaking naming rules.

The problem this article aims to solve is very clear: batch delete all text between two texts in many folder names. That is, find the content between the specified left text and specified right text in each folder name, clear the middle content, and decide whether to keep the left and right texts based on settings. The following, combined with screenshots, uses the office software HeSoft Doc Batch Tool as an example to demonstrate how to complete batch processing using the "Delete text in folder names" feature.

Applicable Scenarios: Which folder names are suitable for this kind of batch processing

"Delete content between two texts" is suitable for processing folders with obvious naming conventions. Common situations include: folder names with fixed prefixes and suffixes, with different numbers, versions, batches, notes, or temporary strings in the middle; this middle content is no longer needed, but the structure before and after should still be retained.

  • Project material archiving: For example, Project_START_alpha_END_Report, need to delete alpha, only retaining Project_START_END_Report.
  • Client folder standardization: For example, Client_START_2024Draft_END_Archive, need to clean up 2024Draft.
  • Design version organization: For example, Design_START_oldVersion_END_Approved, need to delete oldVersion to avoid old version information continuing to display.
  • Invoice or order batch organization: For example, Invoice_START_batch001_END_Paid, need to remove batch001 to make folder names more uniform.
  • Download, backup, export directory cleanup: For example, Backup_START_tempFiles_END_Final, need to remove the temporary directory description.

The key to this type of requirement is: each folder name has a locatable left text and right text. The software uses these two boundaries to locate the middle content, then performs batch deletion, thereby reducing repetitive labor.

Effect Preview: Folder names before processing contain different middle text

From the screenshot before processing, you can see that multiple folder names all contain a similar structure: first part + START + content to be deleted + _END + last part. The text in the middle differs across folders, such as tempFiles, debugInfo, 2024Draft, sampleChunk, oldVersion, batch001, etc.

If processed manually, you would need to enter rename mode for each, select the middle content, delete it, and save. As the number of folders increases, the operation becomes highly repetitive, and it is very easy to accidentally delete START or _END along with it. The value of using a batch processing tool lies in: you only need to set the left and right boundary texts once to process all folders that match the rule at once.

image-Batch delete folder name text,batch rename folders,delete content between two texts

Effect Preview: After processing, only the content between the two texts is deleted

The screenshot after processing shows that the variable middle text has been deleted, and the folder names are uniformly changed to a form where START and _END are directly adjacent. For example, Backup_START_tempFiles_END_Final becomes Backup_START_END_Final, and Build_START_debugInfo_END_Release becomes Build_START_END_Release.

Note that the processing result here retains the left text START and the right text _END, only deleting all content between them. This method is suitable for folder batch renaming tasks that require retaining structural markers but cleaning up variable middle fields.

image-Batch delete folder name text,batch rename folders,delete content between two texts

Operation Step 1: Enter the folder name processing function

After opening HeSoft Doc Batch Tool , you can see multiple office processing categories in the left navigation bar, including File Name, Folder Name, File Organization, Word Tools, Excel Tools, PowerPoint Tools, PDF Tools, etc. Since the processing target this time is folder names, not files like doc, docx, xlsx, pdf themselves, you should enter the Folder Name category.

In the function card, select Delete text in folder names. From the screenshot, it can be seen that this function is used for batch deleting text in folder names, suitable for the current need to "delete all content between two texts".

image-Batch delete folder name text,batch rename folders,delete content between two texts

The purpose of this step is to ensure the correct tool type is selected. If file name related functions are selected by mistake, the processing object might become files instead of folders; if functions like insert text, add prefix/suffix are selected by mistake, the goal of deleting middle content cannot be achieved.

Operation Step 2: Add folders to be processed and check records

After entering the function page, the top of the software interface shows the current function as Delete text in folder names, and adopts a step-by-step process: select records to process, set processing options, set save location, start processing. The first step is to select the folder records to process.

Click Add Folder at the top right of the interface to import the folders that need batch renaming into the list. The screenshot shows 10 folders have been added, and the list contains information such as serial number, name, path, creation time, modification time, and actions. Users can check here whether the folder names are correct and confirm they are all objects to be cleaned up this time.

image-Batch delete folder name text,batch rename folders,delete content between two texts

This step suggests focusing on three checks: first, whether the number of folders meets expectations, for example, the total record count in the screenshot is 10; second, whether the names all contain the left text START and right text _END; third, whether the paths are the target directory, to avoid adding folders that do not need processing into the task. If records that should not be processed are found in the list, they can be removed by clicking the delete icon in the action column. After confirming correctness, click Next Step at the bottom to enter processing option settings.

Operation Step 3: Select "All content between two texts" and input boundary texts

In the "Set processing options" step, the software provides various deletion methods, such as delete all numbers, all Chinese characters, all English letters, all blanks, the leftmost few characters, all content to the left of a certain text, all content to the right of a certain text, position ranges, etc. This example needs to delete content between two specified texts, so All content between two texts should be selected.

According to the screenshot, enter START in the "Left text" input box, and _END in the "Right text" input box. This means the software will first find START in each folder name, then find _END to its right, and then delete the content in between.

image-Batch delete folder name text,batch rename folders,delete content between two texts

The screenshot also shows the two switches "Include left text" and "Include right text" are in the off state. This means START and _END themselves will not be deleted during the deletion process, only the content between them will be deleted. Therefore, the processing result will change from START_tempFiles_END to START_END, rather than deleting START or _END together.

This step is the core of the entire batch process. When entering boundary text, special attention must be paid to case, underscores, and spaces. For example, the right text in this example is _END, which contains an underscore. If only END is entered, the matching range might differ from expectations. To obtain stable results, it is recommended to copy a fixed segment of text directly from the original folder name and paste it into the input box.

Operation Step 4: Set save location according to the wizard and start processing

After completing the processing options, click Next Step. The interface flow shows two subsequent steps: Set Save Location and Start Processing. Since this is a batch modification of folder names, it is recommended to reconfirm the task list and deletion rules before formal execution, especially whether the left and right boundary texts are correct.

In the save location step, select the appropriate save or processing method according to the software interface prompts; then enter the start processing step to execute the batch deletion. After processing is complete, go back to the folder location to check if the names have become the expected effect. According to the post-processing screenshot, all example folders have had the different texts between START and _END deleted, and the START_END structure is uniformly retained.

For important project materials, client delivery directories, or folders that cannot be regenerated, it is recommended to back up the original directory before batch processing, or test run on a small number of sample folders first, and then process all folders after confirming the effect is correct.

Common Issues and Precautions

1. Will the left text and right text be deleted?

From the screenshot settings, the "Include left text" and "Include right text" switches are not enabled, so START and _END will be retained, and only the content between them will be deleted. If you wish to delete the boundary texts together, you need to adjust the inclusion options in the interface accordingly; but in this example, to obtain the START_END result, the switches should remain off.

2. What happens if a folder name does not contain START or _END?

Batch processing relies on left and right boundary texts for positioning. If a folder name lacks one of the boundaries, the software may not be able to match the content to be deleted according to this rule. Before actual processing, you should check the naming pattern in the record list, remove folders that do not match the rule from the task, or set up another set of processing rules specifically for them.

3. Why is the right text written as _END instead of END?

Because in the example folder names, the ending identifier is preceded by an underscore. If _END is entered, the deletion range will be more consistent with the original structure, and START_END can be formed naturally after processing. If only END is entered, superfluous underscores might be left in the middle, or the matching boundary might not be precise enough. During batch renaming, the more accurate the boundary texts, the more stable the results.

4. Can this method be used for file names, Word, Excel, or PDF?

This article demonstrates folder name processing. If you need to process file names like doc, docx, xls, xlsx, pptx, pdf, you need to select the corresponding file name class tools in the software, not the folder name tools. HeSoft Doc Batch Tool is positioned as office software, providing various types of batch processing capabilities, but the corresponding function should be selected for different objects to avoid misoperation.

5. Is backup needed before batch deleting middle text?

Backup is recommended. The efficiency of batch renaming is very high, but it also means incorrect rules can quickly affect multiple records. Especially when processing project archives, contract materials, and financial invoice directories, backing up first or testing on a small scale is a practical way to reduce risk.

Summary: Replace repetitive renaming with batch processing

Batch deleting the content between two texts in folder names is essentially about handing over the series of repetitive actions—"find boundary, select middle characters, delete, save"—to office software for automatic completion. Through HeSoft Doc Batch Tool , you just need to enter the Folder Name category, select "Delete text in folder names", add folders, set "All content between two texts", and input START and _END, to quickly organize a large number of inconsistent folder names into a standardized format.

If you are processing a large number of project directories, export directories, client material folders, or version archive folders, it is recommended to first sort out the fixed left and right boundary texts, and then use the method in this article for batch processing. This can both reduce repetitive labor and lower the risk of missed changes and accidental deletions caused by manual renaming, making folder naming more consistent and document management more efficient.


Keyword:Batch delete folder name text , batch rename folders , delete content between two texts
Creation Time:2026-06-25 06:34:40

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!