When the file name is preceded by a fixed-length English code, department abbreviation, or unnecessary prefix, renaming them one by one is not only time-consuming but also prone to omissions. This article explains how to use HeSoft Doc Batch Tool to batch remove text within a custom-defined position range in file names in office scenarios, such as deleting the 1st to 5th characters in one go, so that Word, Excel, PPT, PDF, image, text, and other files uniformly retain their numbering and extension.
In daily office work, filenames often carry temporarily generated prefixes, such as project codes like Alpha, Bravo, Chart, Delta, department abbreviations, personnel names, or identifiers automatically added by export systems. If this text is no longer needed, the most direct method is manual renaming. However, when the number of files grows from a dozen to dozens or even hundreds, deleting the leading text from each filename one by one becomes very inefficient and is prone to issues like over-deletion, under-deletion, or missed deletions.
This article addresses this typical problem: batch deleting a custom range of text from file names. Taking the files in the screenshot as an example, the original filenames contain different English prefixes and date numbers, such as Alpha2024010101.docx, Bravo2024020202.doc, Chart2024030303.pptx, and so on. Our goal is to uniformly delete the 1st to the 5th characters of the filename, keeping only the numbers that follow, while preserving extensions like docx, doc, pptx, ppt, xlsx, xls, jpg, txt, pdf, csv.
Below, we will use screenshots from the HeSoft Doc Batch Tool interface to explain how to complete this batch renaming operation. This tool is positioned as office software, with its core value being to help users process files in batches, reduce repetitive work, and improve efficiency in document organization, archiving, and delivery.
Use Cases: When to Batch Delete a Specified Range of Text from Filenames
Batch deleting text from a specific position in filenames is suitable for handling files with a relatively regular naming structure. For example, the first few characters of a filename are useless, while the subsequent part contains the actual number, date, order ID, or document code that needs to be kept. Compared to searching for and deleting by keywords, deleting by position range is more suitable for cleaning up prefixes of a fixed length.
Common scenarios include: First, filenames exported from a system carry a fixed-length English code, and the following date or number needs to be retained; Second, after batch exporting scans, contracts, reports, or images, the filenames have an extra batch identifier at the beginning; Third, during team collaboration, different members added names or project codes to the start of filenames, which need to be uniformly removed for archiving; Fourth, Word documents (docx, legacy doc), Excel spreadsheets (xlsx or xls), PowerPoint presentations (pptx or ppt), PDF files, and image files need to be uniformly renamed within the same batch task.
If there are very few files, manual modification might still be acceptable; but once there are multiple file types, a large quantity, and the need for uniform naming rules, using a batch processing tool is more reliable. Especially since office files often involve archive directories, date numbering, and version management, having unified filenames makes subsequent searching, sorting, and sharing much clearer.
Effect Preview: Filenames Before Processing Contain Unwanted Prefixes
Below is the file list before processing. As seen in the screenshot, the names of different file types all have English text at the beginning, such as Alpha, Bravo, Chart, Delta, Eagle, Frame, Graph, Hotel, Index, Judge. The area marked in red is the filename prefix to be deleted.

The common feature of these files is that the first 5 characters are text that does not need to be kept, followed by a string of regular numeric codes. For example, Alpha2024010101.docx, after deleting the first 5 characters, should become 2024010101.docx; Eagle2024050505.xlsx, after deleting the first 5 characters, should become 2024050505.xlsx. In other words, this operation is not about deleting the extension, nor the numbers, but about deleting text within a specified position range in the main part of the filename.
Effect Preview: Only Numbers and Extensions Remain After Processing
After completing the batch processing, the first 5 characters in the filenames have been deleted, making the file names more uniform. As can be seen, the original English prefixes have all been cleaned up, while the files still retain their original extensions, allowing the system to recognize the file types easily.

Examples of the processing results include: Alpha2024010101.docx becomes 2024010101.docx, Bravo2024020202.doc becomes 2024020202.doc, Chart2024030303.pptx becomes 2024030303.pptx, Index2024090909.pdf becomes 2024090909.pdf. For office users who need to batch organize Word, Excel, PPT, PDF, image, text, and CSV files, this method of deleting filename text by range is very suitable for standardizing names.
Operation Steps: Using Office Software to Batch Delete a Custom Range of Text from Filenames
Step 1: Enter the File Name Tool and Select "Delete Text from File Name"
After opening HeSoft Doc Batch Tool , select "File Name" from the function categories on the left. The interface will list functions related to filename processing, such as finding and replacing keywords in file names, inserting text into filenames, adding prefixes and suffixes to filenames, and converting filename case. As we want to delete text from a specified range in the filename this time, select the "Delete Text from File Name" option.

The purpose of this step is to enter the correct batch renaming function module. After selecting this function, you can later add files, set deletion rules, and uniformly execute the processing on the selected files. For users who frequently organize a large amount of office material, centralizing filename processing on one function page can reduce the time spent repeatedly switching and manually editing in the system's file explorer.
Step 2: Add the Files to be Processed and Confirm the File List
After entering the "Delete Text from File Name" function, the software will proceed to Step 1, "Select records to process." In the upper right corner of the interface, you can see buttons like "Add File," "Import Files from Folder," "Clear," "More," etc. You can add single files according to your actual situation, or import a batch of files directly from a folder.

Once added, the software will list the pending files in a table, including information such as sequence number, name, path, extension, creation time, modification time, and actions. As seen in the screenshot, a total of 10 records were imported this time, with file types including docx, doc, pptx, ppt, xlsx, xls, jpg, txt, pdf, csv. Here, it is crucial to check the "Name" column to confirm that these files indeed conform to the rule for deletion by position range. For example, all these files need to have their first 5 characters deleted, and the following numeric codes need to be retained.
If a file should not be included in the processing, you can remove that record using the delete icon in the actions column; if there was an import error, you can also use the "Clear" button to re-add files. After confirming the list is correct, click "Next" to proceed to the processing options settings.
Step 3: Select the Position Range and Enter the Character Interval to Delete
In Step 2, "Set processing options," the software provides various operation types, including All Numbers, All Whitespace, Rightmost Characters, All Content Between Two Texts, All Chinese Characters, All Content, All Content Left of a Text, Position Range, All English Letters, Leftmost Characters, All Content Right of a Text, and more. For this example, we want to delete the first 5 characters of the filename, so we select "Position Range."

After selecting "Position Range," enter "1:5" in the range input box. This can be understood as deleting all text from the 1st to the 5th position in the main part of the filename. Taking Alpha2024010101.docx as an example, the 1st to 5th characters are exactly "Alpha," leaving 2024010101.docx after deletion; for Bravo2024020202.doc, the 1st to 5th characters are "Bravo," leaving 2024020202.doc after deletion.
This step is the key to the entire operation. The range setting must be consistent with the filename pattern. If your filename prefix is 3 characters long, you should set the corresponding range based on the actual situation; if the prefix length is not fixed, you should consider other more suitable deletion methods, such as processing based on the content to the left or right of a specific text. The file prefixes in this article's example have a consistent length, so using "1:5" is the most intuitive approach.
Step 4: Set the Save Location and Start Processing
After completing the processing options settings, click "Next" to proceed to "Set save location." The interface flow shows that there are subsequent stages for "Set save location" and "Start processing." Before formally starting the batch rename, it is recommended to confirm the save location or output method to avoid overwriting important files, especially when handling office documents like contracts, financial spreadsheets, and project materials.
After confirming the save location, proceed to "Start processing." The software will follow the previously set rules and delete the text within the specified range from the files in the list, one by one. Once processing is complete, check the results in the corresponding directory. As long as the range is set correctly, you will get a uniform set of filenames like those shown in the post-processing screenshot.
Common Questions and Precautions
1. Will deleting the range affect the file extension?
From the example results, this processing deletes text at a specified position within the main filename body. After processing, extensions like docx, doc, pptx, ppt, xlsx, xls, jpg, txt, pdf, csv are still retained. During actual operation, you should avoid setting the deletion range to the extension position to prevent affecting file type recognition.
2. What does the range "1:5" mean?
In this article's example, "1:5" means deleting the text from the 1st position to the 5th position. Since Alpha, Bravo, Chart, Delta, Eagle, Frame, Graph, Hotel, Index, Judge are all 5 characters long, using "1:5" can clean up these different prefixes all at once.
3. What should be done if filename prefixes have inconsistent lengths?
If prefix lengths are inconsistent, deleting by a fixed position range might not be suitable for all files. It is recommended to first observe the naming pattern in the list, and then decide whether to use a position range or choose another operation type. Confirming the rules before batch processing is key to ensuring accurate results.
4. Can multiple file formats be processed simultaneously?
Yes. As can be seen from the file list in the screenshot, the same batch task includes Word, Excel, PowerPoint, PDF, image, text, and CSV files. As long as the filename rules are consistent, they can be processed together, making it suitable for the unified archiving of office materials.
Summary: Using Batch Processing to Reduce Repetitive Renaming Work
Batch deleting a custom range of text from file names is a very practical renaming operation for file organization. Through HeSoft Doc Batch Tool , you only need to select the "Delete Text from File Name" function, import files, select "Position Range", and enter "1:5" to quickly delete the first 5 useless characters of the filenames, uniformly keeping the numbers and extensions.
Compared to manual renaming one by one, batch processing is more suitable for organizing a large number of files in an office scenario, especially when multiple file types like docx, doc, xlsx, xls, pptx, ppt, pdf, jpg, txt, csv are mixed together. It is recommended to check naming patterns and confirm the deletion range before processing, and then execute the batch operation. This can both reduce repetitive labor and lower the risk of human modification errors.