How to batch delete the content to the right of specified text in folder names, and keep the delimiter
TranslationïŒEnglishFrançaisDeutschEspañolæ„æŹèȘíê”ìŽïŒUpdate TimeïŒ2026-10-12 22:33:54
When a large number of folder names contain status, version, or note suffixes, renaming them one by one is not only time-consuming but also prone to omissions or accidental deletions. This article uses "END" in folder names as the delimiter to demonstrate how to use HeSoft Doc Batch Tool to delete all content to the right of that text in one step while retaining "END" itself. The article includes before-and-after effects, folder import, deletion rule settings, result verification, and precautions, and is suitable for batch renaming scenarios such as project archiving, asset organization, and data cleaning.
During project archiving, customer data organization, image asset classification, or batch data cleaning, folder names often include status, version, and purpose descriptions. For example, in names such as âBackup_START_tempFiles_END_Finalâ and âProject_START_alpha_END_Report,â what truly needs to be retained is âENDâ and the content to its left, while suffixes such as âFinal,â âReport,â and âDoneâ located to the right of the specified text need to be removed uniformly.
If there are only a few folders, manual right-click renaming can still be done; however, when the number increases to dozens, hundreds, or even more, modifying them one by one creates a large amount of repetitive work and may also lead to missed deletions, deletions in the wrong position, or inconsistent name formats. This article will introduce how to use the office software HeSoft Doc Batch Tool to batch delete all content to the right of a certain text in many folder names. The example uses âENDâ as the anchor text and retains âENDâ itself, ultimately clearing away trailing content of varying lengths in one pass.
1. Applicable Scenarios
This method of batch modifying folder names is suitable for cases where names contain fixed separator text, but the content to the right of the separator is not consistent. Unlike finding and deleting a fixed suffix, this method focuses on the positional relationship: first locate the specified text, then delete all characters to its right. Therefore, whether the right side contains âFinal,â âRelease,â âArchive,â or other text of different lengths, it can all be processed according to the same rule.
- Project folder archiving: Delete stage descriptions, approval statuses, or delivery markers at the end of project names.
- Image and video asset organization: Remove editing statuses such as Edited, Done, and Approved located after fixed markers in asset directories.
- Customer data standardization: Retain customer numbers and business identifiers, and delete temporary notes on the right side.
- Backup directory cleanup: Delete backup statuses, migration notes, or version remarks in folder names.
- Batch data organization: Truncate names according to a uniform separator word to make the directory display more concise.
It should be noted that this tutorial processes folder names, not the text content inside Word, doc, docx, Excel, xlsx, PDF, or image files. The software will batch change folder names according to the configured rules, so before proceeding, you should first confirm the target directories and the anchor text.
2. Preview of Results: What Changes Before and After Processing
1. Folder Names Before Processing
Before processing, the sample directory contains multiple groups of folders. Their common feature is that all names contain âEND,â and to the right of âENDâ there is also status text connected by underscores, such as Final, Release, Archive, Clean, Approved, Paid, Public, Edited, Report, and Done.

As can be seen from the screenshot, the content to the right of âENDâ differs among folders. If ordinary fixed-text replacement is used, each suffix would need to be processed separately; by using the âdelete all content to the right of a textâ rule, you only need to use âENDâ as the anchor to cover these different endings.
2. Folder Names After Processing
After batch processing is completed, the underscores and status text to the right of âENDâ are deleted, while âENDâ itself is retained. For example:
- Backup_START_tempFiles_END_Final â Backup_START_tempFiles_END
- Client_START_2024Draft_END_Archive â Client_START_2024Draft_END
- Invoice_START_batch001_END_Paid â Invoice_START_batch001_END
- Task_START_removeThis_END_Done â Task_START_removeThis_END

The processed folders still exist, and the changes are reflected only in their names. Each folder ends with âEND,â making the naming structure more consistent. This also shows that in the example the âInclude this textâ option was not enabled, so the software deleted the content to the right of the anchor text without deleting âENDâ together with it.
3. Steps: Batch Delete All Content to the Right of the Specified Text
Step 1: Enter the Folder Name Processing Feature
Open HeSoft Doc Batch Tool , and in the left-side feature category select âFolder Name.â The main interface will display multiple functions related to batch folder renaming, including find and replace, insert text, add prefix/suffix, case conversion, and delete text.
The goal this time is not to replace a fixed word, but to delete all content of varying lengths to the right of the anchor text, so select âDelete Text in Folder Names.â

The purpose of this step is to enter the task page specifically for performing text deletion on folder names. For a large number of directories, handing the renaming rules to batch-processing office software can avoid repeatedly opening rename input boxes and manually selecting characters.
Step 2: Add the Folders to Be Processed
After entering the feature page, you are currently in the âSelect records to processâ stage. Click âAdd Foldersâ in the upper right to add the directories that need batch renaming to the list. After adding, the page will list information such as serial number, name, path, creation time, and modification time.

In the example, 10 records were added, and the names in the list are consistent with the pre-processing screenshot. At this point, you should focus on checking the âNameâ and âPathâ columns to confirm that no directories that should not be renamed have been included. If a certain record should not be processed, you can use the delete icon in that rowâs âActionsâ column to remove it from the task list; if you need to reselect, you can also use âClearâ on the page. After confirming there are no errors, click âNextâ at the bottom.
The expected result of this step is that all target folders are included in the pending record list, and the number of records matches the actual number that needs to be modified. The accuracy of a batch task depends largely on whether the imported range is correct, so do not skip this check.
Step 3: Select âAll Content to the Right of a Textâ
After entering âSet Processing Options,â you can see multiple operation types. Select âAll Content to the Right of a Textâ to tell the software to use a certain text as the boundary and treat the content to its right as the deletion range.

Then enter the anchor marker in the required âTextâ input box. In this example, enter âEND.â This text must match the actual characters in the folder names; if the names use uppercase English âEND,â do not mistakenly enter End, end, or other variations.
In the example, the âInclude this textâ option remains off. Combined with the final result, it can be determined that this setting retains the anchor text âENDâ and deletes only the characters to its right. In other words, the name âDesign_START_oldVersion_END_Approvedâ will become âDesign_START_oldVersion_ENDâ.
After completing the settings, click âNextâ at the bottom of the page and continue through the interface to the âSet Save Locationâ and âStart Processingâ stages. Since this is a folder name modification task, you should confirm again that the rule meets expectations before continuing, and then start processing. After the task is completed, return to File Explorer to check the actual names.
Step 4: Verify the Batch Renaming Results
After processing is complete, do not check only the first record. It is recommended to spot-check multiple folders at the beginning, middle, and end of the list, focusing on three items: whether the specified text is retained, whether the content to its right is completely deleted, and whether the original name on the left is unaffected.
In this example, all 10 folders changed from names with different status suffixes to names ending with âEND,â indicating that the rule settings and execution results are consistent.
4. Common Questions and Precautions
1. Should âInclude this textâ be enabled or disabled?
If you want to retain the separator marker and delete only the content to its right, keep it disabled as in this example. After processing, âENDâ will still remain. If business requirements require deleting the anchor text as well, adjust the âInclude this textâ option in the interface and first verify the result using a small number of copies.
2. Will the underscore to the right of the text be deleted?
Whether it is deleted depends on which side of the anchor text the underscore is on. In this example, the name is âEND_Final,â and the underscore is to the right of âEND,â so it belongs to the right-side content and will disappear together with Final after processing. If the underscore is to the left of the anchor text, it is not part of this deletion range.
3. What if some folders do not contain the specified text?
Before batch processing, check the naming structure first to confirm that the target folders do contain the anchor text. For directories with inconsistent formats, it is recommended to process them in groups to avoid mixing different naming rules in the same task. After execution, also check entries that did not change to determine whether the text did not match or the names themselves do not conform to the rule.
4. Is a shorter anchor text always better?
No. If the anchor text is too short, it may also appear in other positions of the folder name, increasing ambiguity in locating it. It is recommended to choose a complete marker that can clearly distinguish the left and right structures, such as â_ENDâ or a separator word agreed upon in the business, and decide the specific input based on which characters you want to retain.
5. Do I need a backup before formal processing?
Batch renaming affects multiple directory names at once. For important projects, shared materials, or paths referenced by other programs, it is recommended to back up the name list first, or copy a small number of folders for testing. After folders are renamed, their paths will also change, and existing shortcuts, scripts, or reference relationships may need to be checked simultaneously.
5. Summary
To batch delete the content to the right of a specified text in folder names, the key is to select the correct deletion type, enter the accurate anchor text, and decide whether to retain that text. Using this example, you only need to import folders in HeSoft Doc Batch Tool , select âAll Content to the Right of a Text,â enter âEND,â and keep âInclude this textâ disabled, and then you can uniformly clear away various suffixes.
Compared with manually renaming files one by one, the batch-processing method of office software can significantly reduce repetitive input and make it easier to ensure consistent naming rules. It is recommended to first organize the folders to be processed, select a small number of copies to verify the rules, and execute the full batch only after confirming the results, so as to balance processing efficiency and directory safety.
KeywordïŒBatch delete the text to the right of the specified text in folder names , batch modify folder names , batch rename folders , delete folder name suffixes , and retain the specified text