How to batch remove folder prefixes? A method to delete left-side text by character count.


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

The folder prefixes vary in content but share the same length, so there is no need to find and replace them one by one. This article demonstrates how to batch-delete a fixed number of text characters from the left side of folder names by character position: first identify the naming pattern, then import the directory via HeSoft Doc Batch Tool , select the leftmost several text characters and set the quantity, and finally complete the processing according to the workflow. The example organizes names such as ABC20240101 into 20240101, which is suitable for date archiving, project directories, customer files, and batch folder renaming.

The resource directories exported from business systems often have department codes, region abbreviations, personnel identifiers, or project classifications added before the folder names. For example, ABC20240101, BCD20241010, DEF20240202. As archiving rules change, these three-letter prefixes may no longer need to be retained, and ultimately only the date numbers after them are needed.

This kind of task may seem like just deleting a few characters, but when there are many directories, manual renaming becomes a highly repetitive operation. Staff need to select each folder one by one, enter rename mode, delete the prefix, and confirm. A slight oversight may delete one extra digit or miss a directory. If the prefixes themselves are also different from each other, ordinary single-keyword find-and-replace can hardly cover all names at once.

A more suitable approach is not to identify specific contents such as ABC, BCD, DEF one by one, but to find their common positional pattern: these prefixes are all at the far left of the folder names, and they are all 3 characters. With the office software HeSoft Doc Batch Tool , you can uniformly delete the left-side text by position and character count, thereby removing folder prefixes in batches. The complete method is explained below with examples.

1. Applicable scenarios: prefixes differ but have the same character count

Deleting left-side text by character count is clearly different from deleting by keyword. The keyword method requires multiple names to contain the same text, while deletion by position only requires the target content to be at the same position and of the same length. Therefore, it is especially suitable for directories whose prefixes have different content but the same structure.

Scenario 1: Date directories preceded by a three-character source code

For example, ABC20240101, GHI20240303, JKL20240404. The letters represent different sources, but only the date needs to be retained during archiving. Since the source codes are all 3 characters, you can uniformly delete 3 characters from the left.

Scenario 2: Customer numbers preceded by a fixed-length business identifier

For example, XS100238, SC100569, KF100781. If the first two characters are temporary classification codes and the following digits are the official customer numbers, you can delete the left 2 characters for the same batch of directories.

Scenario 3: Cleaning up historical naming markers when migrating old data

Old systems may automatically add region abbreviations or employee codes. After migrating to new document management rules, you can use batch folder renaming to remove these markers and unify the directory names.

Scenario 4: Keeping folder contents while only standardizing directory names

This method targets the folder names themselves and does not require opening the internal doc, docx, xls, xlsx, ppt, pptx, PDF, or image files. For office organizing tasks where you only need to unify the outer directory names and do not want to check internal documents one by one, it can significantly reduce mechanical operations.

It should be noted that fixed-count deletion is not suitable for all situations. If some prefixes are 2 characters, some are 3 characters, and some directories have no prefix at all, you should first classify them and not place folders with different structures into the same batch task without checking.

2. Effect preview: from letters plus dates to pure date names

Before processing: every folder has a three-letter prefix

The following image shows the original directories used in this example. The folder names include ABC20240101, BCD20241010, DEF20240202, GHI20240303, JKL20240404, and so on. Although the starting letters differ, the structure is always three English letters plus eight digits.

image-Batch remove folder prefixes,delete the first few characters of folder names,batch process folder names

The goal this time is to delete the three letters on the left side of the names without changing the 8-digit date number after them. There is no need to create separate replacement rules for ABC, BCD, DEF, and so on. You only need one rule that deletes by position to cover all folders.

After processing: only the date numbers remain

After processing is complete, the folder names become 20240101, 20240202, 20240303, 20240404, and so on. The original three letters have been removed, and the following digits remain continuous and intact.

image-Batch remove folder prefixes,delete the first few characters of folder names,batch process folder names

This result is more convenient for sorting, searching, and archiving by date. It should be noted that after the names are changed to pure numbers, the file manager may rearrange the display order. For example, positions originally determined by letters may change to sorting by numeric names. This is only a change in view sorting, not a loss of directories.

3. Before starting, first determine: should you delete by position or by content

Choosing the correct processing logic is key to ensuring accurate batch renaming results. You can first check several folder names at random and answer the following questions: Is the content to be deleted always at the far left? Is the number of characters to delete consistent for each name? Will the remaining names still have clear meaning after deletion?

If the answers are all yes, then it is appropriate to use the leftmost few characters. For example, in this case, no matter whether the beginning is ABC or YZA, what needs to be deleted is always the left 3 characters. Conversely, if you want to delete a certain word that appears in the middle of the name, or if you need to delete everything to the right of a certain text segment, you should choose another operation type corresponding to that structure instead of mechanically applying the parameters of this tutorial.

Also check hidden details. Some folder names may begin with spaces, and there may also be hyphens or underscores after the letters. For example, in ABC-20240101, if the target result is 20240101, you need to include the hyphen in the deletion range; if you only delete 3 characters, the result will become -20240101. Accurately identifying character boundaries can avoid having to rework after batch processing.

4. Operation steps: batch remove folder prefixes by quantity

Step 1: Select the delete text function in the folder name category

After starting HeSoft Doc Batch Tool , select folder names in the left navigation bar. The function panel will display multiple tools related to batch folder renaming. This time, click Delete text in folder names.

image-Batch remove folder prefixes,delete the first few characters of folder names,batch process folder names

The purpose of selecting this function is to create a batch task specifically for deleting characters from names. Since this example is not about adding content to names, nor about replacing unified keywords with other text, there is no need to enter the add prefix/suffix or find-and-replace functions. Choosing the entry point according to actual needs can reduce confusion in rule settings.

Step 2: Add the target folders to the processing records

After entering the task page, the first step is to select the records to be processed. Click Add Folder to add the directories from which prefixes are to be removed into the list. The software will display information such as name, path, creation time, and modification time in table form, making it easier to check uniformly before execution.

image-Batch remove folder prefixes,delete the first few characters of folder names,batch process folder names

There are 10 records in the example list, and the summary area also shows 10 records. Do not rush to click Next at this point. First check the name column to confirm that all directories conform to the structure of three letters plus digits; then check the path column to confirm that no directories with the same name from other locations were added by mistake.

If a folder that does not need to be modified appears in the list, you can use the delete operation on the right side of the corresponding record to remove it from the task. If it needs to be added again, you can also reorganize using the entries provided on the current interface, such as clear and add folder. Filtering and sorting functions can help check records with a large quantity, but whether to use them can be decided based on the actual data scale.

Step 3: Set the operation type to the leftmost few characters

After confirming the list is correct, click Next to enter the page for setting processing options. Among the multiple operation types, select The leftmost few characters. This option means the software will calculate from the starting position of each folder name, rather than searching for a fixed letter combination.

image-Batch remove folder prefixes,delete the first few characters of folder names,batch process folder names

Enter 3 in the quantity field. Taking the name JKL20240404 as an example, the first three characters from left to right are J, K, and L, and after deletion the result is 20240404; taking MNO20240505 as an example, after deleting M, N, and O, the result is 20240505. Although the two prefixes have different contents, the same rule still applies.

The quantity field represents the number of characters to delete, not the number of processing records, nor the final retained name length. After entering 3 here, the same rule will be applied to every record that has been added and participates in processing. After entering the value, confirm again that it was not mistakenly entered as 8 or another number, and then click Next.

Step 4: Continue setting the save location and execute the task

The top of the page shows the complete workflow, including selecting the records to process, setting processing options, setting the save location, and starting processing. After completing the deletion rule, follow the guidance in the software page to enter the subsequent stages, confirm the corresponding save arrangement, and then enter the start processing stage.

Since the screenshots mainly show folder import and rule settings, the actual execution should follow the prompts given in the software's current interface. Before starting, you can also record the original names again, or keep a backup copy of the directory. After the task is completed, open the target directory and check whether the prefixes have been removed as expected.

Step 5: Spot-check and verify the batch renaming results

It is recommended not to look at only one result. You can select one folder from the beginning, middle, and end of the list for checking to confirm that the deletion count is consistent. Then check whether the total number of folders before and after processing is the same, and open several directories to confirm that the internal documents can still be accessed normally.

During acceptance, you can use the method of original name minus the left 3 characters equals the new name. For example, PQR20240606 corresponds to 20240606, STU20240707 corresponds to 20240707, and VWX20240808 corresponds to 20240808. This allows you to quickly determine whether the rule was executed correctly.

5. Frequently asked questions: what is easy to overlook when batch deleting folder prefixes

Question 1: Why can't you simply delete all English letters

If it is confirmed that only the left-side English letters in the names need to be deleted, and no letters that should be retained will appear after them, processing by letter type may also have a corresponding scenario. However, the clearest pattern in this example is the left 3 characters, so using the leftmost few characters gives a clearer boundary. If the official numbers after them contain English letters, deleting all English letters may also remove valid content.

Question 2: When there is a space at the beginning of a name, how should the quantity be calculated

When deleting by position, left-side spaces may also occupy character positions. If some names have spaces and others do not, the same quantity may produce inconsistent results. It is recommended to first organize the abnormal names, or process them separately, and not judge solely by the visual alignment of the folder list.

Question 3: What should be done if prefix lengths are inconsistent

You can process them in batches by structure. First process all directories with 2-character prefixes, then process directories with 3-character prefixes, and check other special names separately. Although batch processing requires creating tasks several times, it is safer than incorrectly deleting official numbers and is also easier to trace back.

Question 4: Will Word, Excel, or PDF files inside the folders be affected

The target of this operation is the folder names, and the purpose is to batch rename directories. The doc, docx, xls, xlsx, PDF, image, and other files inside the folders are not the processing targets of this text deletion rule. However, if other software or business systems reference these directories through fixed paths, the original paths will change after renaming, and related shortcuts, scripts, or reference relationships may need to be updated synchronously.

Question 5: Why is a backup recommended before processing

Batch tools can quickly apply the same rule to many records, which is an efficiency advantage, but it also means that incorrect settings will affect the entire batch of names. Creating a backup first for important project materials, or using copies for a trial run, can reduce the cost of organizing after misoperation. Especially when the character count has not been fully confirmed, it is even more important to test on a small sample first.

Question 6: How to avoid duplicate names after deletion

Before processing, determine whether the remaining names will be unique after removing the prefixes. For example, both ABC20240101 and DEF20240101 will become 20240101 after deleting the first three characters, which may cause a name conflict. In such cases, you should not directly batch delete the prefixes. Instead, you should first redesign the naming rules to ensure that each folder can still be uniquely identified after processing.

6. Practical suggestions for improving batch organization efficiency

For teams that frequently need to standardize directories, you can first establish a naming rule description that clearly defines how many characters are occupied by department codes, dates, project numbers, and version information. Once the rules are clear, it will be easier to choose an appropriate batch processing method later, whether deleting prefixes, adding suffixes, or adjusting names.

You can also split the task into four stages: identification, testing, batch execution, and result acceptance. In the identification stage, confirm the pattern; in the testing stage, use a small number of copies; in the batch stage, execute uniformly; and in the acceptance stage, check quantities and names. This process is more reliable than operating directly on official data, and is especially suitable for large-scale archiving tasks involving hundreds of folders.

7. Summary

When batch removing folder prefixes, it is not always necessary to know the specific content of each prefix. As long as they are all located at the far left of the names and have the same character count, they can be processed in one pass by deleting by position. The example in this article uniformly removes the first three characters from names such as ABC20240101 and DEF20240202, ultimately retaining clear date numbers.

HeSoft Doc Batch Tool is software for batch processing office files and directories, which can turn repetitive folder renaming work into reusable rules. In actual operation, first check the naming structure and duplicate-name risk, then add folders, select the leftmost few characters, enter the exact quantity, and complete the processing according to the subsequent workflow. It is recommended to first copy a small number of sample directories for testing, and only organize the complete data after confirming that the results are correct.


Keyword:Batch remove folder prefixes , delete the first few characters of folder names , batch process folder names
Creation Time:2026-10-13 06:52:35
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.