How to batch delete folder suffix content? A tutorial on truncating names with one click based on specified keywords


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-10-12 22:34:18
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

For folders with different suffix notes such as Final, Release, Archive, and Done, ordinary find-and-replace often requires multiple passes. This article introduces a method for truncating folder names based on keyword position: set “END” as the boundary, batch delete all characters to its right, and keep the keyword. Using HeSoft Doc Batch Tool , you can uniformly import directories, verify task lists, set the deletion range, and complete batch renaming, reducing repetitive operations in project archiving and file organization.

After multiple rounds of transfer of enterprise materials and personal projects, folder names often become longer and longer. The creator may add statuses such as "Final", "Approved", "Public", or "Edited" after the original name, and the next user may continue to append additional notes. Over time, although the main structure of the same batch of directories remains the same, the trailing notes differ from one another, which affects browsing and also makes subsequent archiving inconvenient.

If fixed-text replacement is used for such problems, each status needs to be deleted separately. For example, delete Final first, then process Release, Archive, and Done. A more efficient approach is to find a stable boundary text and then delete all characters to the right of the boundary. The following uses "END" as the boundary to explain how to use office software HeSoft Doc Batch Tool to batch delete folder suffixes. Ultimately, "END" and the name to its left are retained, and no matter what content was originally on the right, it is cleared according to the same rule.

1. Which folder naming problems are suitable for truncation by keyword

Deleting the content to the right of a specified keyword is suitable for naming structures where "the main part on the left needs to be retained and the additional information on the right needs to be removed." The keyword here can be understood as a name boundary or separator marker. As long as a relatively consistent marker exists in the same batch of folders, there is no need to judge the specific text of the suffix on the right one by one.

  • Project directory names contain a unified ending marker, after which the current process status is appended.
  • Design asset folders record temporary notes such as Approved and Edited after the main name.
  • Backup directories append version notes such as Final, Old, and Clean after fixed fields.
  • Customer or batch directories need to have the trailing visibility scope, payment status, or processing result removed.
  • The test environment has generated a large number of folders with the same format but different trailing content.

The advantage of this method is that it does not identify trailing words one by one, but uniformly deletes the content after a certain position. Even if each suffix has a different length, it can be completed in one batch task. However, the premise is that the boundary text is clear enough and the directories to be processed follow the same structure.

2. Preview of the effect before and after batch deletion

Before processing: multiple suffixes exist after the same boundary

The example directory contains 10 folders in total. Although the main parts of the names differ, they all contain "END" and continue to add underscores and status descriptions after it. For example, "Build_START_debugInfo_END_Release", "Notes_START_privateText_END_Public", and "Project_START_alpha_END_Report".

image-Batch delete folder suffixes,truncate folder names by keywords,batch rename folders,delete characters to the right of keywords,organize folder names

The positions marked in red in the screenshot are the trailing content that needs to be deleted this time. It can be seen that the suffixes are not the same word. If processed manually, each one needs to be located and deleted one by one; if fixed find-and-replace is used, it also needs to be configured repeatedly for multiple suffixes.

After processing: all names end uniformly at END

After executing the batch task, the content to the right of "END" in each folder is cleared, including the underscore immediately after it. The original main fields and "END" remain unchanged, and the result is shown in the following figure.

image-Batch delete folder suffixes,truncate folder names by keywords,batch rename folders,delete characters to the right of keywords,organize folder names

For example, "Photo_START_rawSet_END_Edited" is processed into "Photo_START_rawSet_END", and "Data_START_sampleChunk_END_Clean" is processed into "Data_START_sampleChunk_END". This is exactly the effect of truncating the name by keyword: how many characters are on the right and what the specific text is do not matter; as long as they are to the right of "END", they will enter the deletion range.

3. Using office software to batch truncate folder names

Step 1: Find the tool for deleting text in folder names

After starting HeSoft Doc Batch Tool , enter the "Folder Name" category in the left navigation bar. The page displays various folder name processing tools. Since the current requirement is to delete a section of the name, click "Delete Text in Folder Names".

image-Batch delete folder suffixes,truncate folder names by keywords,batch rename folders,delete characters to the right of keywords,organize folder names

When selecting a function, it is necessary to distinguish between "Find and Replace" and "Delete Text". If all directories only need to delete exactly the same fixed suffix, find-and-replace may work; but in this example, the suffixes on the right are different, so a function that can delete content by position should be used.

Step 2: Build the list of folders to be processed

After entering the task page, the first stage is "Select records to be processed". Click "Add Folder" to add the folders to be renamed to the software. After import, the software displays the name, path, creation time, and modification time in a table, and also counts the number of records at the bottom.

image-Batch delete folder suffixes,truncate folder names by keywords,batch rename folders,delete characters to the right of keywords,organize folder names

The 10 folders in the screenshot are all located under the example path. The list is used not only to display the quantity, but also as an important verification step before the actual modification. It is recommended to check the following information line by line:

  1. Whether the name contains the planned boundary text "END";
  2. Whether the folder path belongs to the directory to be organized this time;
  3. Whether any project folders that should not be modified were added by mistake;
  4. Whether the number of task records is consistent with expectations.

If a mistakenly selected record is found, you can click the delete icon in the operation column of the corresponding row; if the entire batch selection is wrong, you can click "Clear" and add them again. After confirming that the list is correct, click "Next" at the bottom. The expected result is to enter the processing options page, with the scope to be processed already accurately determined.

Step 3: Set the deletion type to all content to the right of the keyword

On the "Set Processing Options" page, find and select "All content to the right of a text". This option determines that the deletion range is not a fixed number of characters, nor a specific suffix, but starts from the right side of the specified text and continues to the end of the folder name.

image-Batch delete folder suffixes,truncate folder names by keywords,batch rename folders,delete characters to the right of keywords,organize folder names

Enter "END" in the "Text" input box. What is entered here is the keyword used for positioning and should be consistent with the original folder name. Do not inadvertently add spaces before or after the input, otherwise it may fail to match as expected.

The page also provides an "Include this text" switch. In this example, it remains off, so "END" is only used to determine the boundary and will not be included in the deletion range. What is ultimately retained is "END" and the content to its left. According to the processing result in the screenshot, if you want to obtain "Backup_START_tempFiles_END", you should use this setting.

After completing the rule configuration, click "Next" to continue to the "Set save location" and "Start processing" process shown in the interface. Before execution, it is best to simulate with one name on paper: find END, cross out the "_Final" on the right, and check whether the remaining name is exactly the desired result. Start batch processing only after confirmation.

Step 4: Check the directory after processing is completed

After the task is completed, open the original directory and check the folder names. Do not use only whether the task has ended as the judgment criterion; also compare the results with the expected rules. It is recommended to check at least the records with the shortest suffix, the longest suffix, and names containing more underscores in the main part.

The expected result in this example is that all 10 folders are retained up to "END", and no text such as Final, Archive, or Approved appears to the right of END. The main names on the left, such as Backup, Client, Invoice, and Project, should remain unchanged.

4. Practical methods to improve the accuracy of batch renaming

First determine whether to delete fixed words or all content after a certain position

This is the most critical distinction when choosing a rule. Fixed-word deletion only clears characters identical to the input content; "all content to the right of a text" clears all characters after the boundary. In this example, the status words are not uniform, so the latter is clearly more suitable.

Prioritize boundary text with high uniqueness

If the input keyword may appear multiple times in a folder name, the positioning result may differ from the expectation. Before formal processing, review naming samples and try to choose a complete marker with clear business meaning. If necessary, adjacent underscores can be included in the positioning text, but also consider whether the underscore ultimately needs to be retained.

Split different naming structures into multiple batches

Some folders use END, some use FINISH, and some have no boundary marker. Do not mix them together just to save one operation. First classify them by structure, and then set corresponding rules for each group, which is usually more efficient than reworking afterward.

Create test copies of important directories first

Renaming folders changes the full path. If Word, docx, doc, Excel, xlsx, PPT, PDF, image, or video files are referenced by shortcuts, scripts, or project configurations, the original reference path may become invalid after the parent folder is renamed. It is recommended to first copy a small number of directories for testing and record the original names.

5. Frequently asked questions

Why is END still present after processing?

Because this example selects "all content to the right of a text" and does not enable "Include this text". END is retained as the positioning boundary, which is consistent with the screenshot after processing.

Why did the underscore after END also disappear?

In the "END_Final" structure, the underscore is to the right of END, so it belongs to the deleted content. The software processes by position and does not treat the underscore separately as a character that must be retained.

Can Chinese keywords be used as the boundary?

From the functional logic perspective, the "Text" input box is used to fill in the positioning content and is not limited to the English markers in the example. In actual operation, the text that actually exists in the folder name should be used as the basis, and a small number of samples should be used for verification first.

Do folders need to be selected one by one before processing?

There is no need to rename them one by one manually, but a task list does need to be created through "Add Folder". The value of batch processing lies in setting rules once and applying them to multiple records, rather than repeatedly performing the same renaming action.

6. Summary

When the tail content of many folder names is different but is located after the same keyword, truncating names by keyword is more direct than deleting suffixes one by one. Using HeSoft Doc Batch Tool , first add the target directories, then select "All content to the right of a text", enter "END", and decide whether to include that text, and the folder suffix cleanup can be completed uniformly.

It is recommended to first copy two or three samples from the directory to be organized and verify the results according to the steps in this article. After confirming that the boundary text, retained range, and final names are all correct, add the full batch and execute the processing. In this way, you can make use of the efficiency advantage of office software for batch file processing and reducing repetitive work, while also lowering the risks brought by large-scale renaming.


Keyword:Batch delete folder suffixes , truncate folder names by keywords , batch rename folders , delete characters to the right of keywords , organize folder names
Creation Time:2026-10-12 22:33:55
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.