How to batch delete the content to the left of specified text in folder names? Keep the keyword and the name on the right


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-10-12 22:31:17
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 a large number of folder names have different prefixes, and the names that truly need to be kept start from a fixed text, renaming them one by one is both time-consuming and error-prone. This article uses START as the locating text and introduces how to use HeSoft Doc Batch Tool to import multiple folders at once, select "everything to the left of a certain text", and decide whether to keep START through the "contains that text" option. After the operation is complete, names such as Backup_START_tempFiles_END_Final can be batch-organized into START_tempFiles_END_Final, achieving folder name standardization.

When organizing project materials, client files, image assets, or backup directories, you often encounter a type of folder name like this: the beginning of each name is different, but the middle contains a unified locating text, and the part you really need to keep starts from that text. For example, the original folder names are Backup_START_tempFiles_END_Final, Build_START_debugInfo_END_Release, and Client_START_2024Draft_END_Archive. Now you need to remove the prefixes Backup_, Build_, Client_, and so on, while keeping START and the content to its right.

If there are only a few folders, you can rename them one by one in File Explorer; however, when the number grows to dozens or hundreds, manually deleting the prefixes from folder names creates a large amount of repetitive work and may also cause key characters to be deleted by mistake due to inaccurate selection. This article explains how to use the office software " HeSoft Doc Batch Tool " to batch delete all content to the left of a certain text in folder names. The example uses START as the locating text and keeps START itself, ultimately organizing folders with different prefixes into names that all begin with START.

Applicable scenarios: which folder names can be handled this way

This method is suitable for folder naming structures where the prefix is not fixed but the locating text is fixed. It is different from directly deleting a fixed number of characters: the program first finds the specified text in each folder name and then deletes all content to the left of that text. Therefore, even if the left-side prefixes have different lengths, they can be batch processed under the same rule.

Common application scenarios include:

  • Project directories with department, personnel, or client prefixes that need to be kept starting from a unified project identifier.
  • Downloaded or exported folder names containing source information, where you want to remove the source information and keep only the business name that follows.
  • Historical backup directories beginning with different content such as Backup_, Old_, Temp_, and so on, which need to be standardized starting from a fixed keyword.
  • Image, video, Word document, docx, doc, Excel spreadsheet, PDF, and other materials that have been archived into folders and need unified outer folder names.
  • When migrating files, the system adds batch or account information in front of folder names, and now you need to batch clean up these prefixes.

It should be noted that this tutorial deals with folder names, not deleting folders, and not modifying the Word, Excel, PDF, or image content inside the folders. HeSoft Doc Batch Tool here handles the batch organization of office files and folders, and its core value lies in turning repetitive renaming operations into unified rule-based processing.

Result preview: folder names before and after processing

Before processing: each folder has a different prefix

The following image shows the folder list before this batch rename. As you can see, the beginnings of the names contain Backup_, Build_, Client_, Data_, Design_, Invoice_, Notes_, Photo_, Project_, Task_, and other content respectively; their lengths are not consistent, but they all contain the same START text later in the name.

image-Batch delete the content to the left of the specified text in folder names,batch rename folders,delete folder name prefixes,keep the content to the right of keywords,batch process folder names

The rule for this processing can be summarized as: find START in the folder name, delete everything to its left, and keep START. Taking Backup_START_tempFiles_END_Final as an example, what needs to be deleted is Backup_, and the expected result is START_tempFiles_END_Final. For Client_START_2024Draft_END_Archive, Client_ is deleted to obtain START_2024Draft_END_Archive.

After processing: all names begin with START

After the batch processing is completed, all folder names begin with START. The prefixes that were originally to the left of START and had different lengths have been removed, while START itself and the text to its right remain unchanged.

image-Batch delete the content to the left of the specified text in folder names,batch rename folders,delete folder name prefixes,keep the content to the right of keywords,batch process folder names

From the results, you can see that names such as START_2024Draft_END_Archive, START_alpha_END_Report, START_batch001_END_Paid, and START_debugInfo_END_Release have formed a unified structure. The content inside the folders will not change because the name prefixes are deleted, but the names become more concise and easier to search, sort, and archive under a unified rule.

Operation steps: batch delete all content to the left of specified text

Step 1: Enter the "Delete text from folder names" function

Open HeSoft Doc Batch Tool , and select "Folder Names" in the function category on the left. The main interface will display batch processing entries related to folder names, including find and replace, insert text, add prefix or suffix, case conversion, and other functions. In this case, you need to delete content based on the position of specified text, so click "Delete text from folder names".

image-Batch delete the content to the left of the specified text in folder names,batch rename folders,delete folder name prefixes,keep the content to the right of keywords,batch process folder names

The purpose of this step is to enter the processing flow specifically designed for deleting text from folder names. Do not mistakenly select "Find and replace keywords in folder names", because this task is not about replacing multiple different prefixes such as Backup and Build one by one with empty values, but rather using the commonly occurring START as the boundary to delete all content to its left at once.

Step 2: Add the folders that need batch processing

After entering the function page, you are currently in the "Select records to process" stage. Click "Add Folders" in the upper right to add the folders that need to be renamed to the task list. The software will display information such as serial number, name, path, creation time, and modification time in the table, making it easier to check before processing.

image-Batch delete the content to the left of the specified text in folder names,batch rename folders,delete folder name prefixes,keep the content to the right of keywords,batch process folder names

In the example, 10 records have been added, and the bottom of the list shows "Record count: 10". At this point, you should focus on checking two things: first, confirm that the added items are the folders whose names need to be changed; second, confirm that these folder names all contain START as the locating boundary. If a record does not need to be processed, you can use the delete icon in that row's operation area to remove it from the task list; if the entire list was added by mistake, you can use "Clear" on the page to select again.

After checking, click "Next" to enter the processing option settings. Checking the list in advance can reduce the risk of batch misoperation, especially for folders with similar names and paths distributed across multiple directories, which should be verified item by item according to the "Name" and "Path" columns.

Step 3: Select "All content to the left of a certain text"

On the "Set processing options" page, the operation type provides multiple deletion rules. This time, select "All content to the left of a certain text", which means the software will use the specified text as the locating point and delete all characters to the left of that text in each folder name.

Then enter START in the "Text" input box. The content entered here must be consistent with the text that actually exists in the folder names. The example names use uppercase START, so enter START in the input box as well, not Start or start.

image-Batch delete the content to the left of the specified text in folder names,batch rename folders,delete folder name prefixes,keep the content to the right of keywords,batch process folder names

There is also an "Include this text" switch at the bottom of the page. In the screenshot, this switch is off, which means that when deleting the left-side content, the locating text START is not deleted along with it, so START is kept. According to this setting, Backup_START_tempFiles_END_Final will become START_tempFiles_END_Final.

If the business goal is not to keep the locating text but to keep only the content to its right, then you need to adjust the setting according to the "Include this text" option. For example, if START is not kept, the theoretical name boundary will fall after START. However, what this article wants to achieve is "delete all content to the left of a certain text and keep that text", so the state shown in the screenshot should be maintained.

Step 4: Continue the settings and start batch processing

After confirming the operation type, text content, and the state of "Include this text", click "Next" at the bottom of the page. The top of the interface shows that the subsequent process is "Set save location" and "Start processing". Complete the remaining settings according to the prompts on the software page, confirm the processing objects and save arrangement again before formal execution, and then enter the start processing stage.

During processing, avoid manually renaming, moving, or deleting these folders in File Explorer at the same time, so that the original paths in the task list do not change. After the task is completed, open the corresponding directory to check the results. It is recommended to randomly check the first, middle, and last records to confirm that the left-side prefixes have been deleted and that START and the text to its right are completely retained.

Rule analysis: why prefixes of different lengths can also be deleted at once

This method does not require the prefixes to be deleted to be exactly the same, nor does it require them to have the same number of characters. Backup_ has 7 characters, and prefixes such as Build_, Data_, and Task_ may also have different lengths, but as long as the unified locating text START exists in the name, the software can determine the deletion boundary based on the text position.

The rule can be understood as "left-side content + START + right-side content". During processing, delete the "left-side content" and keep "START + right-side content". For example:

  • Backup_ + START + _tempFiles_END_Final, the result is START_tempFiles_END_Final.
  • Client_ + START + _2024Draft_END_Archive, the result is START_2024Draft_END_Archive.
  • Project_ + START + _alpha_END_Report, the result is START_alpha_END_Report.

Compared with finding and replacing Backup_, Client_, Project_, and so on one by one, using locating text requires configuring the rule only once, which is especially suitable for batch folders whose prefixes are random in content and different in length but whose name structure is consistent.

Frequently asked questions and precautions

1. What happens if a folder name does not contain START

"All content to the left of a certain text" relies on the specified text for locating. If some folder names do not contain START, they do not meet this rule. To avoid results that differ from expectations, after adding folders you should first check the name list and keep only records containing the specified text; you can also process folders with different structures in separate batches.

2. Will START be deleted together

Whether the locating text is deleted depends on the "Include this text" setting. The example in this article needs to keep START, so this switch remains off. If you want to remove START at the same time, you should adjust this option only after fully understanding the result, and first test with a small number of copies.

3. Why does the list order appear to change after processing

File Explorer usually rearranges folders according to the current sorting method. After deleting different prefixes, all names begin with START, and the subsequent characters will participate in sorting, so the display order may differ from before processing. This does not mean that the folder contents have been moved; you should check against the complete names.

4. What if the specified text appears multiple times

If START appears repeatedly in a folder name, the deletion boundary may differ from the user's subjective expectation. Before formal batch processing, you should first check such special names and verify the results with a small number of samples. For records with inconsistent structures, it is recommended to process them in a separate group rather than mixing them with standard names in the same batch task.

5. Can important business directories be processed directly

Batch renaming will affect references to the original names. If other software, scripts, shortcuts, or collaborative processes depend on old paths, the corresponding references may need to be updated after the names change. For important materials, it is recommended to back them up first, or copy a small number of folders for testing, and expand the processing scope only after confirming that the rule is correct.

6. What should be noted when entering the text

You should accurately enter the locating text that actually exists in the folder names, and pay attention to characters such as case, underscores, and spaces. In this example, START is entered because the underscore is to the right of START and needs to be kept. If the actual requirement is to delete up to after the underscore, then the locating text and inclusion option need to be re-planned according to the actual names.

Summary

When faced with a large number of folders that have different prefixes but contain a common locating text, renaming them one by one is both inefficient and prone to omissions. Using HeSoft Doc Batch Tool , you can first batch add folders, then select "All content to the left of a certain text", enter START, and use "Include this text" to control whether the locating text is kept. In this way, you can delete different-length left-side content such as Backup_, Build_, and Client_ at once, while keeping START and the name content to its right.

During actual operation, it is recommended to back up important directories first, select a small number of samples to verify the rule, and carefully check the task list. After confirming that the results meet expectations, perform batch processing on the remaining folders. For users who frequently organize project materials, Word/docx/doc document archive directories, image asset libraries, or client folders, this rule-based operation can significantly reduce repetitive work and make folder naming more unified, clearer, and easier to retrieve.


Keyword:Batch delete the content to the left of the specified text in folder names , batch rename folders , delete folder name prefixes , keep the content to the right of keywords , batch process folder names
Creation Time:2026-10-12 22:30:54
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.