Batch Renaming Tip: Delete text between two keywords in file names


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-06-24 06:39:38

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 file names contain unnecessary text, manual renaming is inefficient and prone to operational errors. This article focuses on the need to delete text between two keywords in file names, demonstrating how to use the function for removing text from file names in HeSoft Doc Batch Tool , by setting the left text START and the right text _END to batch clear the middle fields, assisting office workers in quickly standardizing file naming.

Whether file naming is standardized directly affects the efficiency of data management. Especially in office environments, files often go through multiple stages such as downloading, exporting, modifying, forwarding, and archiving, during which unnecessary intermediate text can easily appear in the names. For example, a batch of file names all contain START and _END, but have different content like sample, private, tempData, removeThis in the middle. For final archiving, this text may be of no value and might even interfere with retrieval.

Modifying files one by one requires constantly selecting the file name, moving the cursor, deleting the middle field, and confirming the change. The more files there are, the longer it takes. For office documents like Word files (docx), PDF files, Excel spreadsheets (xlsx), and txt text files, repeated renaming also increases the risk of accidentally deleting the extension. A more efficient method is to use the batch processing capabilities of office software, setting up rules and executing them all at once.

This article will use the files in the screenshots as an example to explain how to use HeSoft Doc Batch Tool to batch delete text between two keywords in file names. The example rule is: fill in START for the left text, and _END for the right text, deleting only the middle content and keeping the keywords on both sides.

Applicable Scenario: File names with fixed keywords but variable middle content

Batch deleting text between two keywords is suitable for file names that are "regular but not identical." Its difference from standard batch replacement is: standard replacement requires the replaced content to be the same, whereas this method only requires the left and right boundaries to be identical; the middle content can vary.

For example, the following file names can all be processed using the same rule:

  • Archive_START_oldPart_END.txt
  • Data_START_sample_END.txt
  • Doc_START_2024Draft_END.txt
  • Image_START_rawName_END.txt
  • Task_START_removeThis_END.txt

The middle fields of these files are all different, but they are all located between START and _END. Therefore, you only need to set these two keywords in the tool to batch delete the middle text. This approach can improve organization efficiency for contract attachments, project documents, exported reports, log files, image asset lists, and more.

Effect Preview: Content to be deleted is scattered in the middle of file names before processing

The file list before processing shows that each file name retains a structure similar to "Prefix_START_MiddleContent_END.extension". Red markings highlight the middle fields that need to be removed. Because these fields are not completely consistent, manual processing requires individual judgment, rapidly increasing the workload.

image-Batch rename,delete text between two keywords in file names,file name processing tool,batch modify file names

In this example, we do not want to change prefixes like Archive, Data, Doc, File, Image, nor do we want to delete the .txt extension. What we really want to process is only the content between START and _END.

Effect Preview: Middle text is uniformly deleted after processing

After processing, the file names become much neater: the middle text like oldPart, sample, 2024Draft, alpha has disappeared, and the file names are preserved in formats like Archive_START_END.txt, Data_START_END.txt, Doc_START_END.txt.

image-Batch rename,delete text between two keywords in file names,file name processing tool,batch modify file names

From the results, it can be seen that the batch processing did not damage the file extensions, nor did it delete the left or right keywords. This indicates that when setting rules, the boundary text is used to locate the deletion range, rather than being deleted together with it.

Step 1: Open file name related function

First, launch HeSoft Doc Batch Tool . This is a software designed for batch processing office files, where the left side interface organizes different tools by type. As this requirement is batch renaming of files, enter the File Name category.

In the list of file name tools, find Delete Text in File Name. The red arrow in the screenshot points to this function, whose description is batch delete text in file names. Click it to enter the specific processing page.

image-Batch rename,delete text between two keywords in file names,file name processing tool,batch modify file names

The purpose of this step is to select the correct processing tool. For batch file renaming tasks, do not enter Word tools, PDF tools, or text tools; you should complete them within the File Name category.

Step 2: Add or import files to be processed

After entering the Delete Text in File Name page, the first step is to select the records to be processed. At the top of the interface, you can see Add Files and Import Files from Folder. If the number of files is small, you can add files; if the files are all in the same directory, importing from a folder is more convenient.

In the screenshot, the software has already listed 10 files to be processed, displaying information such as file name, path, extension, creation time, and modification time. The bottom of the list also shows the record count as 10, facilitating confirmation of the scope of this batch processing.

image-Batch rename,delete text between two keywords in file names,file name processing tool,batch modify file names

Before proceeding to the next step, focus on checking two points: first, are all files within the current processing scope; second, do all file names contain the left keyword and the right keyword. In this example, all file names contain START and _END, so you can click Next.

Step 3: Select to delete all content between two texts

After entering the processing options setup, the interface will display multiple operation types. Choose All Content Between Two Texts here. The function of this option is to let the software determine the range based on the left and right texts and delete the middle part.

Then, in the required fields, enter:

  • Left Text: START
  • Right Text: _END

When filling in, keep it consistent with the actual characters in the file name, including case, underscores, spaces, etc. In the screenshot, the right text is _END, not just END, because the end marker in the file name has an underscore before it.

image-Batch rename,delete text between two keywords in file names,file name processing tool,batch modify file names

The page also displays two switches: Include Left Text and Include Right Text. As the example effect requires preserving START and _END, keep these switches off. This way, the final deletion only removes the text between them, without deleting the boundary keywords themselves.

Step 4: Set save location and start processing

After completing the rule settings, continue clicking Next, following the wizard to enter Set Save Location. When batch processing file names, the save location setting determines how the processed files are output. It is recommended to choose based on your current data management habits and confirm whether files need to be backed up before processing.

Finally, enter the Start Processing step. The software will execute the batch renaming for the files imported into the list one by one according to the previously set rules. After processing is complete, go back to the folder to view the new file names.

For daily office work, the advantage of this wizard-based operation is the clear process: first select files, then set rules, confirm save location, and finally execute. Compared to manually renaming files directly in the folder, it is more suitable for batch, standardized, and reviewable file organization tasks.

FAQ and Notes

1. Must the left text and right text be unique?
It is best if they have a clear, definitive meaning within the same file name. If START or _END appears multiple times in a single file name, test with a small number of files first to confirm the processing scope meets expectations before performing the batch execution.

2. Can I delete content between two Chinese keywords?
From the functional logic, this operation is based on locating the range using the left and right texts. As long as the corresponding text exists in the file name, it can be set up following the same logic. In actual operation, rely on the software interface support and test results.

3. Will the file extension change after processing?
In this example, the .txt extension remains unchanged because the deletion range is in the middle of the file name and does not involve the extension. When processing other docx, pdf, xlsx files, you should also avoid setting the right text after the extension to prevent affecting file recognition.

4. What if I only want to delete content to the left of START or to the right of _END?
The operation types in the screenshot also include "All Content to the Left of a Text" and "All Content to the Right of a Text." However, the target in this article's example is to delete text between two keywords, so "All Content Between Two Texts" was chosen. In practice, you should select the corresponding operation type based on your target.

5. Why check the effect preview or list before batch processing?
Batch file name modification has a broad impact. Importing the list helps users confirm that the objects being processed are correct. Especially when there are files not intended for processing mixed in the same folder, checking beforehand can avoid mistakes.

Summary: Transforming file name organization from repetitive labor into rule-based processing

Deleting text between two keywords in file names is a very common batch renaming requirement. As long as file names have stable left and right text, you can quickly complete the cleanup with the help of HeSoft Doc Batch Tool . In this example, by selecting "All Content Between Two Texts" and filling in START and _END, we successfully deleted the various middle fields from multiple file names in one go.

If you frequently need to organize system-exported files, project documents, log data, Word documents, PDF files, or Excel reports, it is recommended to apply this type of batch processing method to your daily work. It can reduce repetitive labor, lower the probability of errors from manual renaming, and make file naming more consistent and easier to manage.


Keyword:Batch rename , delete text between two keywords in file names , file name processing tool , batch modify file names
Creation Time:2026-06-24 06:39:23

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!