Batch Remove First 5 Characters from Filename: Custom Range Delete Filename Text Tutorial


Translation:EnglishFrançaisDeutschEspañol日本語한국어,Update Time:2026-06-24 06:47:31

Disclaimer: All images, text, and video content on the website are for reference only and may not be the latest, correct, or accurate. In case of any dispute, please refer to the actual experience effect!

When file name prefixes are inconsistent but lengths are the same, you can batch-delete text from file names by setting a custom position range. This article demonstrates how to, in HeSoft Doc Batch Tool , use the "Delete Text from File Name" function under file naming to import doc, docx, ppt, pptx, xls, xlsx, pdf, jpg, txt, csv and other files, select a position range and enter 1:5, thereby removing the first 5 characters of file names while retaining the date numbers and extensions. Suitable for data archiving, cleaning system-exported files, and batch renaming of office files.

When many office files are generated, downloaded, or aggregated, a prefix is often automatically added to the beginning of the filename. The prefix could be an English code, department code, system identifier, or temporary classification, such as Alpha, Bravo, Chart, Delta, etc. The content you truly need to keep is usually after the prefix, like the date-based numbers 2024010101, 2024020202, 2024030303. When dealing with such filenames, manually deleting the prefixes one by one is not only time-consuming but also prone to deleting the wrong part or even accidentally affecting the file extension.

This article introduces a more suitable method for batch office processing: deleting text from filenames by a custom range. Specifically for this example, it involves deleting the first 5 characters of a filename, turning files like Alpha2024010101.docx, Bravo2024020202.doc, Chart2024030303.pptx into a uniform format of 2024010101.docx, 2024020202.doc, 2024030303.pptx. This method is suitable for filename cleanup tasks where the prefix content varies but its length is consistent.

The following operation uses HeSoft Doc Batch Tool to accomplish this. It is an office software designed for batch processing needs across multiple file types, including documents, spreadsheets, presentations, PDFs, images, and text, helping users reduce repetitive work. For scenarios requiring batch file renaming, deleting filename prefixes, or standardizing material naming, using a tool for batch processing is more stable and efficient than manual operation.

Applicable Scenario: Cleaning Up Filenames with Different Prefixes but Consistent Position Patterns

Deleting filename text by a custom range is best suited for handling useless characters in fixed positions. It does not require the content to be deleted to be exactly the same in every file, but it does require the character range to be deleted to be consistent. For example, in this case, Alpha, Bravo, Chart, Delta, Eagle, Frame, Graph, Hotel, Index, Judge are all 5 characters long. Although the text is different, they are all located at the leftmost part of the filename, so you can delete the 1st to 5th characters in one go.

This requirement is very common in actual office work. For instance, contracts, invoices, reports, and project materials exported from a system often come with a fixed-length identifier; team members might prefix filenames with initials or English codes when submitting files; downloaded materials, screenshots, and statistical data may have source prefixes at the beginning; when organizing cross-format materials, you might want Word, Excel, PPT, PDF, and image files to be displayed according to the same numbering rule. All these scenarios can be quickly completed by batch deleting text from a specified position in the filename.

Unlike Find and Replace, deletion by range is more suitable when the prefix text is inconsistent. If all files contain the same keyword, consider Find and Replace; but if each file's prefix is different but only has the same length, setting a position range is more direct. The example in this article deletes 1:5, which is a typical use of cleaning up filename prefixes by character range.

Effect Preview: Before Processing, the Names Contain a 5-Character English Prefix

Before processing, the folder contains various office files and common material files. The filename format is roughly an English prefix + a date-based number + an extension. The area marked in red is the content to be deleted, which is the first 5 characters of the filename.

image-Batch remove the first 5 characters of file names,customize the range to delete file names,batch rename file names,delete text at specified positions in file names,batch organize office files

As seen from the pre-processing screenshot, the file types are not singular, including Alpha2024010101.docx, Bravo2024020202.doc, Chart2024030303.pptx, Delta2024040404.ppt, Eagle2024050505.xlsx, Frame2024060606.xls, Graph2024070707.jpg, Hotel2024080808.txt, Index2024090909.pdf, Judge2024101010.csv. These files might come from the same data package or be aggregated from multiple office workflow stages.

If you were to manually modify them one by one, you would need to select each file, enter rename mode, delete the prefix, and confirm the extension is intact. Repeating this ten times is already quite tedious, and if it were hundreds of docx, doc, xlsx, xls, pptx, ppt, and pdf files, manual processing would become a significant bottleneck. Therefore, this example adopts a batch processing approach to uniformly delete the 1st to 5th characters from the main part of the filename.

Effect Preview: After Processing, Filenames Start Uniformly with the Date-Based Number

After processing is complete, the English prefixes in front of all filenames have been removed, leaving only the date-based number and the original file extension. The filenames become more organized, making it easier to view them in numerical order and facilitating subsequent archiving, retrieval, and delivery.

image-Batch remove the first 5 characters of file names,customize the range to delete file names,batch rename file names,delete text at specified positions in file names,batch organize office files

For example, Alpha2024010101.docx becomes 2024010101.docx after processing, Bravo2024020202.doc becomes 2024020202.doc, and Delta2024040404.ppt becomes 2024040404.ppt. As you can see, what is deleted is the text at the beginning of the filename, and the extension remains unchanged. This is very important for office files, as the extension is crucial for file type recognition and must not be accidentally deleted during renaming.

Operation Steps: Batch Delete Filename Text by Position Range

The following explanation follows the order of the software interface screenshots. To ensure accurate results, it is recommended to observe the filename pattern before operation and confirm that the prefix length is consistent for all files to be processed. In this example, we need to delete the first 5 characters, so the range is set to 1:5.

Step 1: Open the File Name tool and enter Delete Text in File Name

After launching HeSoft Doc Batch Tool , select File Name in the left navigation bar. The right side will display multiple function cards related to batch file name processing, including Find and Replace Keywords in File Names, Insert Text into File Name, Add Prefix and Suffix to File Name, and File Name Case Conversion. Here, we need to delete a segment of text in the filename, so click Delete Text in File Name.

image-Batch remove the first 5 characters of file names,customize the range to delete file names,batch rename file names,delete text at specified positions in file names,batch organize office files

The purpose of this step is to enter the function page specifically for batch deleting text from filenames. Since we are processing file names, not file contents, there is no need to open the Word, Excel, PPT, or PDF files themselves. After entering the function, the software will guide the user to complete the task through a workflow: selecting records to process, setting processing options, setting the save location, and starting the process.

Step 2: Import the files to process and check the record list

On the Delete Text in File Name page, the first step is to select the records to process. The top-right corner of the interface provides two main entry points: Add Files and Import Files from Folder. If the files to process are scattered, you can add them one by one or select multiple via Add Files; if the files are all in the same folder, you can use Import Files from Folder to import all files from that directory at once.

image-Batch remove the first 5 characters of file names,customize the range to delete file names,batch rename file names,delete text at specified positions in file names,batch organize office files

After importing, the table will show information like the sequence number, name, path, extension, creation time, and modification time for each record. In this example, 10 records were imported, and the extension column shows types like docx, doc, pptx, ppt, xlsx, xls, jpg, txt, pdf, csv. Through this list, users can confirm three things before processing: first, whether the file count is correct; second, whether the file path is the target folder; third, whether all filenames conform to the rule of having a consistent prefix length.

If the list contains files that do not need processing, you can remove the corresponding records first; if an import error occurs, you can use Clear and then re-import. Batch processing is efficient, but its prerequisite is that the processing targets are correct. After confirming the list is correct, click Next at the bottom of the page to proceed to setting processing options.

Step 3: Select position range and enter the deletion interval 1:5

After entering Set Processing Options, you can see multiple operation types. The screenshot includes options like All Digits, All Whitespace, The Rightmost Number of Texts, All Content Between Two Texts, All Chinese Characters, All Content, All Content to the Left of a Text, Position Range, All English Letters, The Leftmost Number of Texts, All Content to the Right of a Text, etc. In this article, we are deleting the first 5 characters of the filename by a custom range, so select Position Range.

image-Batch remove the first 5 characters of file names,customize the range to delete file names,batch rename file names,delete text at specified positions in file names,batch organize office files

After selecting Position Range, enter 1:5 in the Range input box below. Here, 1:5 indicates the range from the 1st character to the 5th character. For Alpha2024010101.docx, the 1st to 5th characters are "Alpha"; for Bravo2024020202.doc, the 1st to 5th characters are "Bravo"; for Chart2024030303.pptx, the 1st to 5th characters are "Chart". After setting this, the software will delete the corresponding text in each filename according to this position rule.

The core of this step is to accurately fill in the range. If what you need to delete is not the first 5 characters but a segment in the middle, you must fill in the corresponding interval based on the actual positions. For instance, if the 3rd to 6th characters in a filename are useless, you cannot fill in 1:5. It is best to manually check a few representative filenames from the list before processing to ensure the same rule can cover all files.

Step 4: Proceed to the next step, set the save location, and execute

After completing the range setting, click Next. Following the workflow bar at the top of the page, the next steps involve setting the save location and then starting the process. Since the screenshots already show the workflow nodes, you can complete the subsequent settings following the software interface prompts. Before batch renaming, it is recommended to double-check that the correct file records and the correct range value have been selected.

For important materials, it is advisable to first run a test with a small number of copied files. After a successful test, then perform batch processing on the materials in the complete folder. This can prevent unexpected filenames caused by incorrect range entry. Once you enter Start Processing, the software will apply the deletion range to the imported file records, completing the batch filename text deletion.

After the process ends, open the folder to view the results. Under normal circumstances, the first 5 English characters of the filename will be deleted, and the subsequent date-based number and extension will be retained. The filenames will be more standardized and better suited for sorting by date or number.

Frequently Asked Questions and Precautions

1. Why not manually rename files one by one?

Manual renaming is suitable for a very small number of files but not for batch organization. Especially when there are many file types, users need to frequently confirm whether extensions like docx, doc, xlsx, pptx, pdf are preserved. Using a batch processing tool turns repetitive actions into a single rule setting, reducing the number of human operations and lowering the risk of missed changes and accidental deletions.

2. Does 1:5 always mean deleting the first five characters?

In the example of this article, the range entered is 1:5, used for deleting the 1st to 5th characters at the leftmost part of the filename. This is suitable when the prefix length is 5 for all files to be processed. If your filenames have different prefix lengths, you need to adjust the range according to the actual filenames, or split the files into multiple batches for separate processing.

3. Will the file extension change?

As seen from the pre- and post-processing screenshots, extensions like docx, doc, pptx, ppt, xlsx, xls, jpg, txt, pdf, csv still exist after processing, and the file types have not changed. The focus of the operation in this article is on deleting text from the file name, not converting file formats. However, during any batch file name operation, it is recommended to first check the processing results to ensure the extension has not been incorrectly altered.

4. Can Word, Excel, PPT, and PDF be processed simultaneously?

Yes. This example includes Word documents like docx and doc, Excel spreadsheets like xlsx and xls, PowerPoint files like pptx and ppt, as well as pdf, jpg, txt, csv, etc. Since the operation object is the filename, which is independent of the file content format, a uniform naming rule can be applied to multiple file types at once.

5. What if the prefix contains Chinese characters or numbers?

If the content to be deleted is still within a fixed range, you can continue using Position Range. For example, if the first 2 Chinese characters or the first few digits are not needed, as long as the position pattern is consistent, you can process by range. The screenshot also shows other operation types like All Digits, All Chinese Characters, All Whitespace. In practice, you can choose the most suitable method based on the filename pattern. This article focuses on the custom range, making it especially suitable for deletion needs with clear positions.

Summary: Quickly Standardize Filenames in Batch Using Custom Range

Batch removing the first 5 characters of a filename is essentially deleting filename text by a custom range. This article uses a group of files including docx, doc, pptx, ppt, xlsx, xls, jpg, txt, pdf, csv as an example to demonstrate how to enter the File Name function in HeSoft Doc Batch Tool , select Delete Text in File Name, import files, select Position Range, and enter 1:5 to delete the filename prefix.

Before processing, filenames contained English prefixes like Alpha, Bravo, Chart; after processing, the filenames uniformly retain the date-based number and original extension. Compared to manual renaming one by one, batch processing can save significant time and is particularly suitable for scenarios like material archiving, project file organization, system-exported file cleaning, and unified naming of cross-format office files. It is recommended that you first confirm the filename pattern before official processing, then test the range with a few files, and execute the batch process after confirming the results are correct. This ensures accuracy while fully leveraging the value of office software in reducing repetitive work and improving efficiency.


Keyword:Batch remove the first 5 characters of file names , customize the range to delete file names , batch rename file names , delete text at specified positions in file names , batch organize office files
Creation Time:2026-06-24 06:47:06

Disclaimer: All images, text, and video content on the website are for reference only and may not be the latest, correct, or accurate. In case of any dispute, please refer to the actual experience effect!

Related Articles

Don't see the feature you want?

Provide us with your feedback, and after evaluation, we will implement it for free!