How to batch remove folder prefixes? Delete the opening letters or numbers of multiple directories at once
Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-10-12 22:23:13
For folder names like ABC20240101 and DEF20240202 with a "letter prefix + date" pattern, there is no need to enter rename mode one by one and manually delete the prefix. This article introduces how to use HeSoft Doc Batch Tool to clean folder prefixes by character position: first add multiple directories, then select "the leftmost few characters," enter the number of characters to remove, and finally complete the process according to the workflow. This method is also suitable for deleting fixed-length department codes, region abbreviations, serial numbers, and old project identifiers, effectively reducing repetitive operations.
During the long-term circulation of enterprise materials, folder names often accumulate department abbreviations, region codes, system numbers, or old project identifiers. For example, a batch of archived directories originally used formats such as "ABC20240101", "GHI20240303", and "JKL20240404", where the first three letters were used to distinguish their early sources. After the materials are consolidated into a new date-based archive, these letters no longer serve any purpose, and only the following date needs to be retained.
Deleting folder prefixes one by one may seem simple, but the actual operation is quite mechanical: select the directory, enter rename mode, move the cursor, delete characters, confirm, and then repeat the same steps for the next item. The more directories there are, the easier it is to miss deletions or delete the wrong number of characters due to declining attention, even mistakenly deleting 3 characters as 2 or 4. A more efficient approach is to use office software to create a one-time deletion rule, allowing multiple folders to be renamed in batches according to the same rule.
The following uses HeSoft Doc Batch Tool as an example to demonstrate how to delete the leading letters from multiple directories at once. The example rule is to delete the leftmost 3 characters of folder names, leaving only the 8-digit date after processing. This approach can also be used for fixed-length numeric codes, employee identifiers, regional abbreviations, and other content located at the beginning of names.
1. Applicable Scenarios: Cleaning Fixed-Length Folder Prefixes
Scenario 1: Removing department or regional letter codes
Different departments may use codes such as ABC, BCD, or DEF to name material directories. After materials are centrally archived, if the parent directory can already indicate the department, the codes in subfolders will appear redundant. As long as these codes have the same length, they can be deleted uniformly according to the number of leftmost characters.
Scenario 2: Deleting serial numbers at the beginning of folder names
Some directory names start with numbers such as "001", "002", or "003", followed by the project name. If the sorting logic changes and the original numbers are no longer needed, a fixed number of leading digits can be removed in batches. Note that if there are spaces, underscores, or hyphens after the numbers, you should first decide whether these separators should also be deleted.
Scenario 3: Cleaning old system identifiers generated during migration
Folders exported from an old system may automatically carry fixed-length source identifiers. Before migrating materials to a new platform, uniformly cleaning these prefixes helps keep naming concise and also facilitates subsequent searching, sorting, and identification.
Scenario 4: Keeping only the date or business number in folder names
If directories follow a structure of "code + date" or "abbreviation + business number", and only the latter part is currently needed, you can delete a fixed number of characters from the left side of the name. The example in this article removes a three-letter code and retains the complete date.
It should be emphasized that deletion by position is more suitable for prefixes with consistent lengths. If some folders start with a 2-character code, some with a 4-character code, or some directories have no code at all, you should first sort and organize them and create separate tasks accordingly, rather than applying the same quantity to all names.
2. Preview of Results: From Letters Plus Dates to Pure Date Directories
Before processing: each name has three letters on the left
The folder list before processing is as follows. The names contain prefixes such as ABC, BCD, DEF, GHI, JKL, MNO, PQR, STU, VWX, and YZA, followed by date digits. Although the letter content differs, each prefix is 3 characters long.

Taking a few of them as examples: "ABC20240101" is expected to become "20240101", "DEF20240202" is expected to become "20240202", and "MNO20240505" is expected to become "20240505". The focus of this type of requirement is not to find a specific group of identical letters, but to uniformly delete the three leftmost positions of each name.
After processing: only eight-digit dates remain
After processing, the three-letter prefixes in the folder names have disappeared, and the directories are uniformly displayed in date formats such as 20240101, 20240202, 20240303, and 20240404.

By comparison, it can be seen that the retained part was not re-entered, but came directly from the original folder names. Therefore, using the position-based deletion method can not only reduce the amount of input, but also avoid numeric errors that may occur when manually entering dates. The unified names can also be sorted naturally by year, month, and day, making it easier to browse archived records.
3. Operation Steps: Removing the Leading Text from Multiple Folders at Once
Step 1: Select the folder name processing tool
Launch HeSoft Doc Batch Tool , and select "Folder Name" in the left navigation bar. The main interface will display functions related to directory naming, including find and replace, insert text, add prefix and suffix, case conversion, and delete text from folder names.
Click "Delete Text from Folder Name" to enter the task page for this operation.

This step is used to clarify the processing target and method. Because this time what needs to be adjusted is the folder name itself, rather than Word, doc, docx, Excel, PDF, or image files inside the folder, the function under the "Folder Name" category should be used. Even if the directory contains various office documents, this rule is only set around the added folder names.
Step 2: Add the directories to be processed in batches
On the "Select records to process" page, click "Add Folder" in the upper right corner to add the directories whose prefixes need to be removed to the list. After adding, the page will display the sequence number, name, path, creation time, and modification time of each item, making it easier to confirm the processing scope.

In the example, a total of 10 records are added, and the summary area shows the record count as 10. Each record has a delete icon on the right, which can be used to remove directories that should not participate in this processing. The page also provides "Clear", which is suitable for re-adding when the selected range is entirely wrong.
At this point, do not rush to the next step; first observe the name structure. Confirm that each directory satisfies the condition that "the first 3 characters need to be deleted, and the remaining characters need to be retained intact." In particular, pay attention to whether there are abnormal items such as "AB20240101" or "20240101": the former has only 2 letters, while the latter has no letter prefix. If 3 characters are deleted together with other directories, the results will not meet expectations.
After verification, click "Next" at the bottom.
Step 3: Set to delete the leftmost 3 characters
After entering "Set processing options", select "Several leftmost characters" in the operation type. This option means counting from the starting position of the name to the right and deleting the specified number of characters.
In the required "Quantity" input box below, enter 3. In this example, 3 is entered because prefixes such as ABC, BCD, and DEF are all composed of three English letters.

The rule can be understood in a simple split way:
- ABC20240101 = ABC + 20240101, after deleting the leftmost 3 characters, 20240101 remains;
- GHI20240303 = GHI + 20240303, after deleting the leftmost 3 characters, 20240303 remains;
- YZA20240909 = YZA + 20240909, after deleting the leftmost 3 characters, 20240909 remains.
Although the operation type list also includes options such as "All English letters", for this example, using "Several leftmost characters" more directly reflects the requirement: only process the specified amount of content at the beginning of the name. Especially when the latter part of the folder name may also contain letters, limiting the range by left-side position is more helpful for protecting the text that needs to be retained.
Step 4: Complete saving and processing according to the workflow
After completing the settings, click "Next" at the bottom. From the workflow at the top of the page, you can see that the task will also enter the "Set save location" and "Start processing" stages. Complete the subsequent configuration according to the prompts in the software interface, and review the processing target, operation type, and quantity before starting.
Before formal execution, it is recommended to operate on a copy or test directory first. After processing is complete, return to the folder location to check the names. The correct result should meet two conditions: first, the original three letters have been deleted; second, the date digits remain intact, with no missing digits or extra symbols. If the result meets expectations, apply the same rule to a larger batch of formal directories.
4. Why Processing by "Several Leftmost Characters" Is More Appropriate
1. It is not affected by the specific content of the prefix
If fixed keywords were used for searching, different content such as ABC, BCD, and DEF would need to be processed separately. When deleting by the leftmost 3 characters, only the position and length matter, and a single rule can cover the entire batch of directories.
2. It reduces manual selection and keyboard input
Manual renaming requires repeatedly positioning the cursor and pressing the backspace key, and the number of operations increases linearly with the number of directories. A batch tool only requires adding records and setting the quantity once, which is especially suitable for large numbers of names with the same structure.
3. It retains the valid part of the original name
The deletion rule only clears the specified amount on the left side, while the rest continues to use the original name. For longer project numbers, contract numbers, or date information, there is no need to re-enter them, which can reduce input errors.
4. It facilitates the formation of a standardized operation process
When a team often receives directories in the same format, "check structure - add directories - delete left-side characters - verify results" can be used as a fixed organization process. Once the rules are clear, it is also easier for different personnel to maintain consistency when executing the process.
5. Common Questions and Handling Suggestions
Question 1: Can the leftmost 5 characters be deleted?
The "Quantity" can be adjusted according to the actual prefix length. The 3 in the screenshot is only the parameter for this case, not a fixed value. If the prefix consists of a 4-character code and an underscore, and you want to remove all of it, you need to calculate the quantity to delete based on the actual names.
Question 2: Will different letter prefixes in different folders affect the processing?
No, as long as the prefix lengths are the same and all are located at the far left of the names. This rule deletes by position and does not judge specific content such as ABC or DEF.
Question 3: What if there are spaces at the beginning of the name?
Leading spaces are also part of the name content and may affect position calculation. If a folder has invisible spaces, you should first check the actual name and include whether the spaces need to be deleted in the quantity calculation. Do not set the value based solely on the number of letters visible on the screen.
Question 4: Can duplicate names appear after deletion?
This is possible. For example, "ABC20240101" and "DEF20240101" will both become "20240101" after deleting the first 3 characters. Therefore, before execution, compare whether the parts to be retained are unique. If multiple folders will produce the same name, adjust the naming scheme first or process them separately.
Question 5: Is a backup necessary before batch operations?
A backup is recommended. Renaming folders may affect existing shortcuts, reference paths, or other business processes. It is safer to first copy a small number of directories for testing, confirm that the processing result and related systems are not affected, and then operate on the formal data.
Question 6: Why should the record count and paths be checked?
Once a batch task begins, it will apply to all records in the list. The record count can help determine whether directories were missed or added by mistake, and the paths can confirm whether the correct locations were selected. Path verification is especially important when similar names exist under different disks or different projects.
6. Summary
Batch deletion of folder prefixes does not require renaming each one individually. For directories with "different prefix content + same prefix length", simply open the "Delete Text from Folder Name" function in HeSoft Doc Batch Tool , add multiple folders, select "Several leftmost characters", and enter the quantity to delete, and a unified processing rule can be created.
In the example, 10 directories with different three-letter codes were organized into pure date names with a single setup. Compared with manual deletion, this batch processing method in office software is more suitable for project archiving, material migration, and standardization of shared directories. You can now copy a few representative folders to a test location, fill in the deletion quantity according to the steps in this article, and after verifying that the names are correct, process the complete directory list.
Keyword:Batch remove folder prefixes , batch delete the starting letters of directory names , rename multiple folders uniformly