Batch rename folders using keywords as delimiters: delete the left content and keep the keywords


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

To keep a specific keyword in a folder name while deleting all characters to the left of it, you can use batch deletion by text position. This article uses START as the boundary to explain in detail how to select the folder name feature in HeSoft Doc Batch Tool , import multiple directory records, set "all content to the left of a specific text", disable "include this text", and verify the processing results. The tutorial also analyzes the difference between fixed-length deletion and keyword-based positioning, as well as issues such as backup, duplicate marking, and same-name conflicts.

In daily office work, folder names often accumulate more information as files move through workflows. Initially, there is only the project name. After backups, testing, reviews, or migrations, source, department, batch, or handler identifiers are added to the front of the directory name. Over time, the same batch of materials may appear in different forms such as Backup_START_…, Build_START_…, Client_START_…, Project_START_…, and so on.

If you now want to standardize the naming and make all folders start from START, the actual operation you need to perform is: find START in the name, delete all content to its left, and keep START itself and the text to its right. This requirement cannot simply be understood as "deleting a prefix", because each prefix may have a different length. Only by using keyword-based positioning can the same set of rules adapt to multiple naming forms.

This article uses HeSoft Doc Batch Tool to demonstrate the complete workflow. It is an office software that focuses on solving the problem of repeatedly processing large numbers of files and folders. Users do not need to enter the Windows rename state for each item one by one. They only need to add directories in batches and configure the rules once, and then multiple records can be processed uniformly. This is suitable for tasks such as administrative archiving, project management, design asset organization, financial document organization, and data migration.

1. Problem solved and applicable scenarios

This article addresses "batch deletion of all content to the left of a certain text in many folder names". The task contains three clear conditions:

  1. The processing targets are the names of multiple folders;
  2. Each name contains common text, such as START;
  3. Delete the characters to the left of the common text, while preserving that text and the content to its right.

As long as the actual requirement meets these three conditions at the same time, you can refer to the method in this article. Common application scenarios are as follows.

Removing source names from project directories

Directories submitted by different teams may begin with the team name, followed by the START marker for the formal project fields. During centralized archiving, the team name can be removed so that the directory starts from the unified field.

Cleaning old system prefixes after historical data migration

Folders exported from an old system may carry Backup, Archive, Export, or other identifying text. If the new system only needs the part after the boundary marker, the names can be cleaned in one pass based on the keyword.

Batch organizing review, publishing, and delivery directories

The right side of folder names may contain statuses such as Draft, Archive, Release, Approved, Paid, Public, Edited, Report, Done, and so on. When deleting the source prefix on the left, these valid statuses must still be preserved. Positioning by START can avoid affecting the information on the right.

Standardizing directory formats for office materials

Folders may contain Word docx and doc files, Excel xlsx and xls spreadsheets, PowerPoint presentations, PDFs, images, or text files. Although this process does not modify the contents of these files, standardizing the outer directory names helps with later searching, sorting, and archiving.

2. Comparison of results before and after processing

Before processing: similar name structures but inconsistent beginnings

The image below lists ten folders waiting to be processed. They all contain START and END, but to the left of START are Backup_, Build_, Client_, Data_, Design_, Invoice_, Notes_, Photo_, Project_, and Task_, respectively.

image-Batch rename folders by keywords,delete the content to the left of the keywords,and batch keep the specified text

From the screenshot, it can be seen that the red marker emphasizes the area to the left of START. Although this part needs to be deleted for every directory, the deletion range cannot be expressed as a uniform number of characters. For example, Build_ and Invoice_ have different lengths. If the process simply removes the leftmost six or eight characters, some names will inevitably be incorrect.

Therefore, this task uses a "positional relationship" to define the deletion range: START is the boundary. Everything to the left of the boundary is deleted, while the boundary and everything to its right are retained.

After processing: names uniformly start with START

After completing the task, the result is shown in the image below. The original source prefixes have disappeared, and all ten folders now start with START.

image-Batch rename folders by keywords,delete the content to the left of the keywords,and batch keep the specified text

For example, after processing, Build_START_debugInfo_END_Release becomes START_debugInfo_END_Release; Design_START_oldVersion_END_Approved becomes START_oldVersion_END_Approved; Task_START_removeThis_END_Done becomes START_removeThis_END_Done. The content on the right side of the names remains in its original form.

This result also shows that "include this text" is not enabled. If the deletion range included START, the processed names would no longer display START. Understanding this is key to configuring the rule correctly.

3. Detailed steps for batch deletion of left-side content by keyword

Step 1: Select the correct folder name tool

Open HeSoft Doc Batch Tool , and click "Folder Name" in the left navigation pane. The right function area contains various directory renaming tools. This task selects "Delete text in folder names".

image-Batch rename folders by keywords,delete the content to the left of the keywords,and batch keep the specified text

Why not choose "Find and replace keywords in folder names"? Because this task is not about separately replacing multiple words such as Backup, Build, and Client with empty text. Instead, it is about using START as the boundary and deleting all the variable content before that boundary. Using the positional rule in the deletion function is more direct and does not require creating a separate replacement condition for each prefix.

Why not choose "Add prefix and suffix to folder names"? Because the goal is to reduce the original name content, not to add characters. First clarifying the task type and then selecting the corresponding tool can reduce configuration errors.

Step 2: Import the directories to be processed in batch

After entering the "Delete text in folder names" page, you are first in the "Select records to process" stage. Click "Add Folders" in the upper right corner to add the directories to be renamed to the task.

image-Batch rename folders by keywords,delete the content to the left of the keywords,and batch keep the specified text

After adding them, the table displays the name and full path of each folder, and also lists information such as creation time and modification time. In the screenshot, all ten records are located under the sample path, and the record count at the bottom is 10. Users can use this information to determine whether the wrong location was selected.

It is recommended to perform a "pre-batch checklist inspection" here:

  • Check the number of folders to avoid selecting too few or too many;
  • Check the paths to avoid processing directories with the same name but in different locations;
  • Confirm that all names contain the exact same START;
  • Exclude directories that may be synchronized with or in use by other programs;
  • Create backups of important materials in advance.

If unrelated records are found, they can be removed from the task list using the delete action on the right side of that record. After confirming the list, click "Next" to enter rule configuration.

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

When configuring processing options, the page lists multiple deletion ranges, including numbers, whitespace, Chinese characters, English letters, the leftmost or rightmost few characters, content between two texts, positional ranges, and all content to the left or right of a certain text.

Here you should select "All content to the left of a text". After selecting it, enter START in the "Text" input field.

image-Batch rename folders by keywords,delete the content to the left of the keywords,and batch keep the specified text

This setting can be broken down into one easy-to-understand sentence: in each folder name, locate START and delete all characters before START. The left-side content can be Backup_, or it can be Project_. Its length and actual text do not need to be the same.

Step 4: Turn off "Include this text" to preserve START

In the screenshot, the switch under "Include this text" is off. This setting determines whether START belongs to the deletion range.

  • Off: only delete the content to the left of START, and START is retained;
  • On: the deletion range includes the boundary text, and the result no longer retains START.

The goal of this article is to preserve the keyword, so it should remain off. In this case, "Invoice_START_batch001_END_Paid" will become "START_batch001_END_Paid". If it is turned on before processing, the result format will change and will not be consistent with the result image in this article.

Additional attention is needed for separators. In this example, the left and right sides of START are connected with underscores. After deleting the left-side content and preserving START, the name naturally begins with START, and no extra characters remain at the very beginning. If your own naming structure is different, you should first predict the final string based on samples.

Step 5: Verify with representative names before execution

Do not look at only one of the simplest records. It is recommended to select one name with a short prefix, one with a long prefix, and one with complex right-side text for verification. For example:

  • Data_START_sampleChunk_END_Clean should become START_sampleChunk_END_Clean;
  • Invoice_START_batch001_END_Paid should become START_batch001_END_Paid;
  • Project_START_alpha_END_Report should become START_alpha_END_Report.

If the expected results for all three types of samples are correct, then click "Next" at the bottom of the page. This verification method can help detect problems early, such as incorrect keyword entry, selecting the wrong rule direction, or the "Include this text" status not matching the requirement.

Step 6: Complete the batch processing according to the page flow

The workflow shown at the top of the software indicates that after processing options there are still "Set save location" and "Start processing". Users should continue to complete the subsequent settings according to the interface prompts, and confirm the target directory and rules again before final execution. Since the existing screenshots only show the processing options page, the subsequent specific interface should be based on what is actually displayed in the currently installed version.

After processing is complete, return to the directory to check the names. The ideal result should match the result image: the first visible text of every folder name is START, the original prefixes such as Backup, Build, and Client no longer appear, and the content to the right of START remains complete.

4. Why keyword-based positioning is more efficient than renaming one by one

Suppose there are one hundred folders. Manual operation requires repeating actions for each record, including selecting it, entering rename mode, locating the deletion range, and confirming the name. The more repetitions there are, the more likely problems such as missed changes, spelling errors, and inconsistent deletion positions will occur.

Batch processing concentrates the manual work into two stages: importing the target records once, and defining the processing rules once. After that, the office software applies the rules to all matching directories. The efficiency benefit is not only reflected in speed, but also in consistency of results. As long as the rules are verified, the same batch of names is processed according to the same logic, without random differences caused by operator fatigue.

In addition, keyword-based positioning does not require the prefixes to be the same. Compared with separately deleting Backup_, Build_, Client_, and similar prefixes, only one START condition needs to be maintained. This is especially suitable for folder collections with many sources and complex naming histories.

5. Common questions and risk checks

What is the impact of entering the wrong keyword?

If START is spelled as other text, the original names may fail to match correctly. When entering it, pay attention to whether letters, spaces, underscores, and other symbols are consistent with the folder names. Do not copy an incomplete keyword from a name with abnormal formatting.

What should be done if some folders do not contain the keyword?

These records should be filtered out separately and processed according to their own naming rules. Do not use overly broad text just to cover a small number of abnormal names, as this may match unexpected positions in normal directories.

What if the keyword appears twice in the name?

The existing screenshots do not show the positioning method for multiple matches, so it cannot be assumed that the software definitely uses the first or last occurrence. For names where START appears repeatedly, a copy should be made first and tested separately, or a more complete and unique text should be used as the boundary.

What should be done if duplicate names appear after processing?

If two directories differ only in the left-side prefix that is deleted, they may end up with the same name after processing. For example, A_START_Report and B_START_Report would both point to START_Report. Before batch processing, check whether the right-side content is unique, and keep necessary identifiers for conflicting directories.

Does renaming folders affect the files inside them?

Files such as Word, Excel, PDF, and images inside the folder will not be rewritten because the outer directory is renamed, but the full access path of the files will change. If document links, shortcuts, macros, scripts, synchronization software, or business systems record the old paths, they need to be updated or evaluated in advance.

Can official materials be processed directly?

It is not recommended to skip testing. A safe process is to first copy three to five representative directories, perform a small-scale processing run, and check the names and file access conditions. After confirming that the results are correct, import the complete data. Keeping backups of important materials can reduce the impact of misconfiguration.

6. Summary

Using a keyword as the boundary to batch rename folders is suitable for solving the problem of "inconsistent prefixes, non-fixed deletion lengths, and content on the right that must be preserved". In this example, in HeSoft Doc Batch Tool , enter "Folder Name", select "Delete text in folder names", add the target directories, set the operation type to "All content to the left of a text", enter START, and turn off "Include this text", finally making all names uniformly start from START.

Compared with renaming one by one, this method can turn repetitive operations into a single rule configuration, improving the speed and consistency of organizing large amounts of office materials. In actual use, please back up the directories first, check whether the keyword is unique, predict whether duplicate-name conflicts will occur, and then start verification with a small number of samples. After confirming that the processing results are correct, you can execute the batch operation and complete directory standardization.


Keyword:Batch rename folders by keywords , delete the content to the left of the keywords , and batch keep the specified text
Creation Time:2026-10-13 06:56:18
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.