Batch Archiving by Fixed Character Range in File Names: From Mixed Files to Auto-Categorized Folders


TranslationEnglishFrançaisDeutschEspañol日本語한국어Update Time2026-06-29 06:51:24

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!

Fixed character ranges in filenames often represent region, project, department, or batch information. This article uses a txt file classification example to explain how to use HeSoft Doc Batch Tool to select "Classify by characters within a custom range," using characters 4 to 6 as the folder name to batch generate directories such as LON, NYC, PAR, SYD, TYO for efficient file organization.

When organizing materials, many businesses and individuals first establish file naming conventions, such as using the first few characters for a serial number, the middle characters for a category, and the last few characters for a sequence number. This naming method facilitates identification, but if the files are still all piled into one folder, it remains inconvenient to use. The truly efficient approach is to extract the category field from the file names and convert it into a folder structure.

This article focuses on the office scenario of "batch organizing many files into groups based on characters within a fixed range in their file names." Example files include "128LON75957.txt," "233SYD50778.txt," "662PAR30266.txt," etc., where the 4th to 6th characters are category codes. Using HeSoft Doc Batch Tool , you can set this character range as the classification basis, allowing the software to automatically complete the filing into folders.

Applicable Scenario: Fixed Character Range Represents Business Category

The prerequisite for archiving by a fixed character range is that the file names have a stable format. The format in the example is very clear: the first three digits distinguish file numbers, the 4th to 6th characters are a three-letter code, followed by numeric sequence numbers, with a .txt extension. The 4th to 6th characters—LON, NYC, PAR, SYD, TYO—are not random characters but business identifiers that can be used for classification.

In actual office work, these identifiers may represent different meanings: in foreign trade materials, they might be city or country codes; in project materials, project abbreviations; in financial materials, account sets or department codes; in warehousing materials, warehouse zone codes; in R&D materials, version or module identifiers. As long as the classification field is in a fixed position, a "range" can be used to define the classification rule.

This method is especially suitable for handling large numbers of files. For example, batch organizing txt logs, Word reports (docx/doc), Excel spreadsheets (xlsx/xls), PDF contracts, scanned images, design assets, and more. Compared to manual organizing, using office software for batch processing reduces repetitive clicks, lowers the probability of misfiling, and maintains consistent classification standards.

Effect Preview: Files Are Named with Rules but Not Grouped Before Organizing

From the pre-processing screenshot, you can see multiple txt files arranged in the same directory. The red underline highlights the three-letter code in the file names, and the red arrow also points to this fixed character area. This means the basis for classification already exists but has not yet been converted into folders.

image-Fixed character interval archiving,batch file classification,create folders by file name,batch move files,batch document processing tool

If this mixed state continues, subsequent use will become increasingly troublesome. For example, if you need to filter all PAR files, you would have to search for "PAR" in the file list; if you need to send SYD files separately to a colleague, you would have to pick them out one by one; if many file names are similar, you might also mistakenly select other categories. File naming conventions only truly enhance management efficiency when combined with a folder structure.

Effect Preview: Independent Folders Generated by Code After Organizing

After processing, the system generated multiple category folders, namely LON, NYC, PAR, SYD, and TYO. These names were not manually entered but automatically extracted based on the 4th to 6th characters of the file names. Files with the same code are centralized into the same folder.

image-Fixed character interval archiving,batch file classification,create folders by file name,batch move files,batch document processing tool

This result aligns with most office archiving habits: folders represent categories, and files retain their original names. Users can quickly locate a category through the folder, while also preserving the serial numbers and sequence numbers in the original file names for convenient source tracking.

Operation Steps: From Selecting the Function to Completing Archiving

Step 1: Find the "Classify by File Name" Function in File Organizing

Open HeSoft Doc Batch Tool , and select "File Organizing" in the left function bar. This software is a batch processing tool for office scenarios, with its core value being the replacement of repetitive manual operations with rules. After entering File Organizing, select "Classify Files by File Name."

image-Fixed character interval archiving,batch file classification,create folders by file name,batch move files,batch document processing tool

The purpose of this step is to enter the correct batch archiving task. The interface may show other organization-related functions, but this task is not about file extensions or modifying file times; rather, it's about generating category folders based on fixed characters in file names, so you should click "Classify Files by File Name."

Step 2: Add the Files to be Processed to the Task List

After entering the function page, the software displays four steps: Select records to process, Set processing options, Set save location, and Start processing. The first step requires importing files. The top of the interface provides "Add Files" and "Import Files from Folder," which users can choose based on where their files are stored.

image-Fixed character interval archiving,batch file classification,create folders by file name,batch move files,batch document processing tool

If the files to be processed are all in the same directory, such as D:\test\ in the screenshot, it is recommended to use "Import Files from Folder." After importing, the table will display fields like file name, path, extension, creation time, and modification time. Here, you can see the record count is 20, indicating that 20 files are currently waiting to be processed.

Before clicking next, it is advisable to check if the file names in the list meet expectations. For instance, the 4th to 6th characters of "128LON75957.txt" are LON, and those of "230SYD60610.txt" are SYD. If files with different naming rules are mixed into the list, it's best to remove them first to avoid generating incorrect classifications.

Step 3: Set Classification Method to Custom Position Range

After confirming the file list, click "Next" at the bottom to enter the processing options settings. This is the key part of the whole operation. Since we want to archive by a fixed character range in the file name, choose "Classify by characters within a custom position range" in the classification method.

image-Fixed character interval archiving,batch file classification,create folders by file name,batch move files,batch document processing tool

The software interface provides various classification methods, such as by first character, by first number, by first English letter or Chinese character, by last few characters, by first few characters, and by custom regular expression. For file names where the classification field is in the middle, choosing "Classify by characters within a custom position range" is more accurate.

Step 4: Enter 4:6 in the Range Input

After selecting the custom position range, enter "4:6" in the "Range" input box. This means extracting characters from the 4th to the 6th position of the file name as the category name. Taking "975TYO35070.txt" as an example, the first three digits are 975, and the 4th to 6th characters are TYO, so it will be placed into the TYO folder; taking "701NYC86360.txt" as an example, the 4th to 6th characters are NYC, so it will be placed into the NYC folder.

When setting the range, ensure the digit positions match the actual file name structure. Don't just look at one file; spot-check multiple files to confirm that the classification code is in the same position for all. If some file names have a two-digit prefix and others have a three-digit prefix, the 4th to 6th characters might no longer consistently be the classification code. In such cases, you need to unify the file naming rules first before processing.

Step 5: Confirm the Letter Case Conversion Option

In the screenshot, the "Letter Case Conversion" area has "Default" selected. This means the software will generate classification results based on the original characters in the file names. If the file names use all uppercase codes, like LON, NYC, PAR, keeping the default is fine. This way, the generated folder names will also remain uppercase, consistent with the original file names.

If there are unified naming requirements within the team, it is recommended to decide on the folder name format before batch processing. For this example, no extra conversion is needed because all the category codes are already uniformly uppercase.

Step 6: Set Save Location and Start Processing

After clicking "Next," the process enters the "Set Save Location" stage. It is recommended to choose a new output directory, like a folder specifically for saving the classification results. This way, even if a review is needed, you can clearly distinguish between the original files and the processed folder structure.

Finally, enter "Start Processing." Based on the name of each file record, the software will batch-read the 4th to 6th characters, automatically create the corresponding folders, and group the files together by category. Upon completion, you will see the LON, NYC, PAR, SYD, TYO and other category folders, achieving the effect of moving from a mixed directory to structured archiving.

Common Questions or Notes

1. Why not classify by the first three digits?

The basis for classification depends on business needs. In the example, the first three digits of the files are more like serial numbers, which might be different for each file; the 4th to 6th letter codes are the classifiable information. During batch classification, you should choose the character interval that represents the category, rather than simply selecting the first few characters of the file name.

2. What happens if there are duplicate codes in the file names?

Duplicate codes are precisely the target of classification. As long as multiple files have the same 4th to 6th characters, they will be placed into the same classification folder. For example, if several files contain SYD, they will be centralized into the SYD folder, making it easy to view and process them uniformly.

3. Where do the processed folder names come from?

The folder names come from the characters extracted within the range you set. After entering "4:6," the software takes the 4th, 5th, and 6th characters from each file name. If the extraction result is LON, it generates or uses the LON folder; if the result is PAR, it generates or uses the PAR folder.

4. Is this applicable to non-txt files?

The example uses txt files to clearly demonstrate the file naming rules. In reality, as long as the software imports file records and the file naming rules are consistent, office documents or asset files like docx, doc, xlsx, xls, pdf, png, jpg can also be organized using the same method.

5. What is the most important check before batch processing?

The most important check is verifying that the character range is correct. It is recommended to first test with a few representative files, for instance, picking one each for LON, NYC, PAR, SYD, TYO, to confirm their classification codes are all located from the 4th to the 6th position. Process all files only after confirming it is correct.

Summary: Transforming File Naming Rules into Executable Batch Organization Rules

The fixed character interval in a file name is essentially a hidden classification rule. Through HeSoft Doc Batch Tool , users can apply this rule directly to file organization: import files, select classification by file name, set the custom range “4:6”, specify the save location, and start processing. The software automatically completes the folder creation and archiving actions.

For users who frequently need to organize large amounts of office materials, this method can significantly reduce repetitive labor and avoid errors caused by manually moving files. The next time you encounter txt, Word, Excel, PDF, or image files with fixed-position codes in their names, consider prioritizing batch processing for archiving, making file management more efficient and standardized.


KeywordFixed character interval archiving , batch file classification , create folders by file name , batch move files , batch document processing tool
Creation Time2026-06-29 06:51:09

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!