How to batch delete inconsistent folder prefix lengths? Tutorial on extracting names based on specified text


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

When folder prefixes vary in length, batch deletion by a fixed number of characters can easily lead to errors. A more reliable method is to find the marker text that is common to all names and delete everything to the left of that text. This article uses START as the anchor text to demonstrate how to use HeSoft Doc Batch Tool to import multiple folders, set the deletion range, keep the marker text, and complete batch renaming, while also explaining common considerations such as no matching text, duplicate keywords, name conflicts, and path references.

One of the most troublesome situations when organizing folders in batches is inconsistent prefix lengths. For example, a group of directories may start with Backup_, Build_, Client_, Invoice_, and Project_ respectively. Although all of these prefixes need to be removed, the number of characters is not the same: if you modify them one by one, the workload is heavy; if you uniformly delete a fixed number of characters from the left, you may delete too many or too few.

The key to solving this type of problem is not to treat "how many characters to delete" as the rule, but to find a stable name boundary. The sample folders all contain START, so START can be used as the anchor text to batch delete all content to its left while preserving START and the project name and status information to its right. The following will combine interface screenshots to introduce how to complete this task using HeSoft Doc Batch Tool .

HeSoft Doc Batch Tool is a batch processing software designed for organizing office materials. Its value is not only to process a single directory, but to apply the same rule to multiple records at once, reducing repeated clicking and manual entry. For users who need to archive a large number of folders, Word documents (docx, doc), Excel workbooks (xlsx, xls), PDFs, images, or text materials, batch processing can significantly reduce the time occupied by mechanical operations.

1. Which situations are suitable for deleting folder prefixes by specified text

Truncating folder names by specified text is suitable for scenarios where names contain a common marker, but the length to the left of the marker is not fixed. Typical uses include the following.

1. Remove identifiers added by systems from different sources

When different business systems export directories, they may automatically append system names, task names, or source channels. Even if the prefixes are completely different, as long as they are followed by a unified field marker, that field can be used as the boundary to delete the content to its left.

2. Delete customer names, department names, or operator names

Original directories may take the form of "Customer_START_Project_END_Status" or "Department_START_Materials_END_Version". After the materials enter a unified archive repository, the customer name and department name are no longer needed, and the standard portion starting from START can be retained.

3. Clean up backup and test directory prefixes

Backup tasks often add Backup before the directory, development tasks may add Build, and design workflows may add Design. Manually cleaning these prefixes requires separate judgment, whereas locating them by a common marker allows the same rule to process them all.

4. Standardize batch delivery directories

Delivery materials usually require consistent directory naming. If source names have been mixed into the front of historical materials, batch deleting the content to the left of the specified text can give all directories a unified starting point, making sorting, retrieval, and subsequent archiving easier.

This method is suitable for processing folder names, and is not equivalent to deleting the contents of folders. After renaming, files such as docx, doc, xlsx, xls, pptx, pdf, jpg, and png in the directories remain in their original folders. However, directory paths will change with the names, so attention should still be paid to reference relationships.

2. Effect preview: how prefixes of unequal length are uniformly removed

Before processing: different numbers of characters on the left

The following image shows the directory list before batch renaming is executed. Each folder name consists of three parts: an unfixed left prefix, the common START, and the content to the right of START that needs to be preserved.

image-Batch delete folder prefixes,truncate folder names by specified text,batch process folder names

For example:

  • Backup_START_tempFiles_END_Final
  • Build_START_debugInfo_END_Release
  • Client_START_2024Draft_END_Archive
  • Design_START_oldVersion_END_Approved
  • Task_START_removeThis_END_Done

The left parts Backup_, Build_, Client_, Design_, and Task_ in these names have different lengths, so it is not appropriate to delete them using a uniform fixed number of characters. The common occurrence of START provides a clear and stable truncation position.

After processing: all names start from START

After setting "all content to the left of a certain text" and entering START, the processing result is shown in the following image.

image-Batch delete folder prefixes,truncate folder names by specified text,batch process folder names

It can be seen that the left prefixes of different lengths have all been removed, and the names uniformly become START_2024Draft_END_Archive, START_alpha_END_Report, START_batch001_END_Paid, and similar forms. The content to the right of START has not been uniformly replaced or truncated; the software simply deletes the left portion according to the specified boundary.

3. Use office batch processing software to complete batch renaming

Step 1: Open the folder name processing module

After starting HeSoft Doc Batch Tool , find "Folder Name" in the left navigation bar. The right side will display function cards related to directory naming, including "Delete text in folder names". Click that function to enter the task page.

image-Batch delete folder prefixes,truncate folder names by specified text,batch process folder names

The reason for choosing this function is that the current requirement belongs to deleting partial text in the original name, rather than adding a prefix, inserting text, changing case, or find-and-replace. Accurately selecting the function entry can avoid inconsistency between subsequent settings and the goal.

From the top of the interface, you can also see the software version information and product name. The page divides operations into four stages: selecting records, setting processing options, setting the save location, and starting processing. This step-by-step approach makes it convenient for users to check each item before actually executing.

Step 2: Add the directories to be processed to the task list

In the "Select records to process" stage, click "Add Folder" and select the directories that need batch renaming. After adding, the software will display the folders in a table and list information such as name, path, creation time, and modification time.

image-Batch delete folder prefixes,truncate folder names by specified text,batch process folder names

The task list in the screenshot contains ten folders, and the bottom summary shows "Record count: 10". This step is not only importing data, but also the most important inspection step before batch processing. It is recommended to confirm item by item:

  1. Whether each record in the name column contains START;
  2. Whether the path column points to the actual directory that needs to be processed;
  3. Whether a parent directory, unrelated directory, or important system directory was added by mistake;
  4. Whether the total number of records matches expectations.

If a record should not participate in processing, you can use the delete icon in that row's operation area to remove it from the list. When re-importing is needed, you can combine visible operations such as "Clear" on the page to organize the current task. After confirming that everything is correct, click "Next" at the bottom.

Step 3: Set START as the deletion boundary

After entering "Set processing options", you can see multiple operation types. Since the goal is to remove the content before START, you should select "All content to the left of a certain text", and enter START in the required "Text" input box below.

image-Batch delete folder prefixes,truncate folder names by specified text,batch process folder names

When setting this, two points need to be understood. First, "a certain text" refers to the anchor content, namely START; second, "all content on the left" refers to all characters from the beginning of the folder name to before START, and regardless of how many characters this part contains, it will be deleted by position.

In the screenshot, the "Include this text" switch is off, which means the deletion range does not include START itself. Therefore, Client_START_2024Draft_END_Archive will become START_2024Draft_END_Archive, rather than _2024Draft_END_Archive. This article requires preserving the anchor text, so the state should remain consistent with the screenshot.

Step 4: Check the rule through example deduction

The most common problem in batch tasks is not inconsistent software execution, but the user's misunderstanding of the rule. Before clicking Next, you can first select several names from the list and work them out on paper or in a note-taking tool:

  • Photo_START_rawSet_END_Edited → START_rawSet_END_Edited;
  • Notes_START_privateText_END_Public → START_privateText_END_Public;
  • Data_START_sampleChunk_END_Clean → START_sampleChunk_END_Clean.

If the deduced results are in the desired format, it means the operation type, text, and the "Include this text" state are set correctly. If you want the results to start directly from rawSet, privateText, or sampleChunk, then the requirement is already different, and you should reconsider whether to include START and how to handle adjacent underscores, rather than directly reusing the parameters in this article.

Step 5: Continue to complete saving and start processing

After confirming the options, click "Next", and complete the settings related to the save location according to the subsequent stages on the software page, then enter "Start Processing". Since the screenshot does not show the specific options on later pages, actual operations should follow what is displayed in the current software interface, and you should not execute directly without first checking the target location.

After the task is completed, open the corresponding directories to check the results. It is recommended to check at least the first record, one record in the middle, and the last record in the list, and confirm that the original office files in the directories can still be accessed normally. The final effect should be consistent with the post-processing screenshot: all folders start from START, and the source prefixes on the left have disappeared.

4. Common questions and batch renaming precautions

1. Can I directly delete a fixed number of characters from the left?

Fixed-number deletion is suitable only when all prefix lengths are exactly the same. In this example, Backup, Build, Client, Invoice, and others have different lengths, so START should be used as the boundary. Otherwise, part of the prefix may be left behind, or START and subsequent valid characters may be mistakenly deleted.

2. Is START case-sensitive?

The screenshot does not reflect the case-matching rule, so before processing, you should ensure that the markers in the folders are spelled consistently. START, Start, and start should not be treated as exactly the same without testing. The safest approach is to first select a small number of copies for verification.

3. What should be done if multiple instances of START appear in one name?

Repeated markers will cause ambiguity in locating the boundary. Because the screenshot does not explain which match the software uses when multiple occurrences exist, you must test with representative names before formally executing the batch operation. You can also find a more complete and more unique boundary text to reduce the possibility of repeated matching.

4. Will duplicate folder names appear after processing?

After deleting prefixes, different original names may produce the same result. For example, both A_START_Project and B_START_Project may become START_Project. Two directories with the same name cannot normally be kept under the same path, so before processing, you should predict whether the results will be unique and arrange separately for records that may conflict.

5. Will renaming affect document or program paths?

After folder names change, the full paths will also change. If Excel external links, shortcuts, scripts, synchronization tasks, or business systems use the original paths, the impact should be assessed first. For ordinary office archiving, it is also recommended to keep backups and avoid executing batch renaming while files are in use.

6. When should "Include this text" be enabled?

This option should be used only when users need to delete not only the content to the left of START, but also START itself. The result in this article explicitly preserves START, so the switch remains off. Before switching, attention should be paid to whether adjacent separators such as underscores also meet the final naming requirements.

5. Summary

When facing folder prefixes of inconsistent length, the correct approach is not to calculate how many characters each prefix has, but to find a boundary text that exists stably in the name. With the "Delete text in folder names" function of HeSoft Doc Batch Tool , select "All content to the left of a certain text", enter START, and turn off "Include this text", and you can batch preserve START and the content to its right.

This processing method is suitable for project archiving, migration directory cleanup, customer data organization, and delivery folder standardization. It is recommended to start immediately with a small number of test directories: first copy samples, add folders, check paths, set rules, and verify results; after confirming that there are no name conflicts or path reference problems, apply the same rule to the complete directory to achieve safe and efficient batch folder renaming.


Keyword:Batch delete folder prefixes , truncate folder names by specified text , batch process folder names
Creation Time:2026-10-13 06:55:56
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.