When a large number of file names contain unwanted dynamic content, such as serial numbers, temporary tags, version descriptions, or intermediate fields, renaming them one by one is both time-consuming and error-prone. This article explains how to use HeSoft Doc Batch Tool to set left text and right text in file names, deleting all content between them in one go, ideal for batch organizing various file types including txt, doc, docx, pdf, and xlsx.
In daily office work, file names often become more complex as they move through export systems, project workflows, and archiving. For example, a batch of files might use naming formats like Archive_START_oldPart_END.txt, Doc_START_2024Draft_END.txt, where the content between START and _END is just a temporary field and does not need to be kept. If there are only a few files, manually changing them is manageable; but when the number of files reaches dozens, hundreds, or even more, deleting the middle content from file names one by one would be very inefficient, and prone to omissions and errors.
The problem addressed in this article is: Batch deleting all content between two text strings in file names. Using the file name processing feature of the office software HeSoft Doc Batch Tool , you can import the files to be processed in bulk, specify the left boundary text and right boundary text, and then clean up the file names in one go. This method is applicable not only to .txt text files but also to batch organizing Word documents (.doc, .docx), Excel spreadsheets (.xls, .xlsx), PDF files, and other common office materials.
Applicable Scenarios: Which File Names Are Suitable for Deleting Content Between Two Text Strings
This method is highly suitable when file names contain fixed start and end markers, and the content between them needs to be uniformly deleted. For example, file names containing system-generated serial numbers, export batches, temporary version names, review notes, test fields, internal identifiers, etc., can all be processed in batches as long as the content on either side follows a pattern.
Common scenarios include:
- System-exported file names with fixed markers like START and _END, where the middle content needs to be removed.
- Batch-downloaded document names mixed with useless numbers, batch numbers, or temporary notes.
- Project files requiring the removal of test, draft, or private fields from file names before archiving.
- A large number of .txt, .docx, .pdf, .xlsx files needing uniform standardized naming to reduce manual renaming workload.
- Multiple files with consistent name structures but different middle content, which cannot be resolved by a simple find-and-replace in one step.
Unlike ordinary find-and-replace, deleting content between two text strings is better suited for handling file names with a "variable middle section." For example, the middle fields in START_oldPart_END, START_sample_END, START_2024Draft_END are all different, but they are all located between START and _END, allowing for batch deletion by locating the boundary text.
Effect Preview: File Names Containing Different Middle Text Before Processing
From the before-processing preview, you can see that each file name in the list contains START and _END, with different content mixed between them, such as oldPart, sample, 2024Draft, alpha, rawName, debugInfo, etc. These middle fields vary in length and content. Deleting them manually one by one is not only repetitive but can also easily affect the file extension.

The common characteristic of these file names is: the prefix on the left (e.g., Archive, Data, Doc) needs to be kept; the marker and extension on the right (e.g., _END.txt) also need to be kept; but the dynamic middle content is unnecessary. The operational goal of this article is to uniformly delete this dynamic content.
Effect Preview: Only the Two Text Boundaries Are Kept After Processing
After the operation is complete, the middle content in the file names has been batch-deleted, resulting in names like Archive_START_END.txt, Data_START_END.txt, Doc_START_END.txt. As you can see, START and _END are still retained, while the middle content like oldPart, sample, 2024Draft has disappeared.

The advantage of this processing method is that users do not need to identify what the middle field is one by one; they only need to determine the left and right boundary text. For file names with a uniform structure but different middle content, batch processing is significantly more efficient than manual modification.
Operation Step 1: Enter the File Name Tool and Select the Delete Text Feature
After opening HeSoft Doc Batch Tool , select File Name in the left feature category. This category provides various batch processing capabilities related to file names, such as finding and replacing keywords in file names, inserting text into file names, adding prefixes and suffixes, case conversion, etc. What this article needs to use is Delete Text in File Names.
In the main interface, find the feature card numbered 10 for Delete Text in File Names and click to enter. The purpose of this feature is to batch delete specified text content in file names, suitable for the need in this example to delete the content between START and _END.

The goal of this step is to enter the correct batch file name processing module. Upon entering, the software will guide the user through a wizard process to complete record selection, processing option settings, save location settings, and start processing.
Operation Step 2: Add Files to Be Batch Processed
Upon entering the feature, the top of the interface shows the current tool is Delete Text in File Names, and provides action buttons like Add Files, Import Files from Folder, and Clear. Depending on the number of files and storage method, you can choose to add files individually or import them directly from a folder.
As shown in the screenshot, 10 records have been imported into the pending list, displaying information such as serial number, name, path, extension, creation time, modification time, and actions. The file path is in the D:\test directory, and the extension is .txt. In actual office scenarios, if you need to process .doc, .docx, .pdf, .xls, .xlsx, or other files, you can follow the same approach to import the files to be renamed.

After importing files, it is recommended to first check whether the file names in the list comply with the rules to be processed, especially confirming that each file name contains the left and right text to be set. In this example, all file names contain START and _END, so you can continue by clicking the Next button at the bottom to enter the processing options settings.
Operation Step 3: Select All Content Between Two Text Strings
On the Set Processing Options page, the software provides multiple deletion rules, including All Digits, All Whitespace, Last Several Texts, All Chinese Characters, All Content, All Content to the Left of a Text, Position Range, All English Letters, All Content to the Right of a Text, etc. To achieve the goal of this article, select All Content Between Two Texts.
After selecting this option, you need to fill in two key fields:
- Left Text: Enter START.
- Right Text: Enter _END.
In the screenshot, you can see START is entered in the left text input box, and _END is entered in the right text input box. Below, there are also toggle switches for Include Left Text and Include Right Text. In the example, these two switches are turned off, so the software only deletes the content between START and _END, without deleting START and _END themselves.

This step is very critical. If you want the final result to retain the boundary text, do not turn on Include Left Text and Include Right Text; if the business requirement is to delete the boundary text as well, adjust the switches based on the actual situation. Using the effect in this article as an example, the processed file name is still Archive_START_END.txt, indicating that the boundary text is retained and the middle content is deleted.
Operation Step 4: Set the Save Location and Start Processing
After completing the processing option settings, click Next to enter Set Save Location. This step is to determine the save mode or processing location for the batch-renamed files. Since batch modification of file names affects multiple files, it is recommended to confirm that the file list and deletion rules are correct before formal processing. If necessary, copy a test file first for verification.
After setting the save location, proceed to Start Processing. The software will follow the previously set rules to identify START and _END in each file name and delete all content between them. After processing is complete, return to the folder to see that the file names have been batch-changed to the target format.
Common Questions and Notes
1. Should the left and right text include underscores?
Fill in according to the actual content in the file name. In this example, the left marker is START, and the right marker is _END. Since _END contains an underscore at the front, the right text should be entered as _END. Whether an underscore is included will directly affect the matching position and the final result.
2. Why are START and _END still there after processing?
Because the example did not enable Include Left Text and Include Right Text, only the content between the two text strings is deleted. If you want to delete the boundary text as well, you need to set it according to the include toggle switches in the interface.
3. What happens if a file name does not contain START or _END?
If some file names do not match the set rules, they may not be deleted as expected. Therefore, after importing files, first check the list to ensure the structure of the file names to be processed is consistent, or remove non-conforming files from the list.
4. Can this method only process .txt files?
No. The file extension in the screenshot example is .txt, but the method essentially performs batch processing on file names. In actual office work, Word documents (.doc, .docx), Excel spreadsheets (.xls, .xlsx), PDF files, and other common files can all be organized using the same approach as long as their file names meet the rules.
5. Do I need to back up before batch processing?
It is recommended to back up important files first or use test files to verify the rules. Batch renaming is highly efficient, but if the rules are set incorrectly, it can quickly affect multiple file names, so checking before processing is very important.
Summary: Reducing Repetitive Renaming Work with Batch Processing
The core idea of batch deleting content between two text strings in file names is to locate the middle field using left and right boundary text, and then let the office software automatically complete the deletion. Compared to manual individual modification, HeSoft Doc Batch Tool can significantly reduce repetitive labor when the number of files is large and naming rules are relatively uniform, improving efficiency in file organization, data archiving, and document delivery.
If you are dealing with a large number of file names containing temporary fields, batch information, version notes, or system markers, you can follow the steps in this article: enter the File Name category, select Delete Text in File Names, import files, choose All Content Between Two Texts, fill in the left and right boundary text, and finally start processing. This will quickly yield uniform, clear, and standardized file names.