When a large number of files accumulate in a folder and the file names start with fixed prefixes such as cities, projects, departments, or dates, manually creating new folders and moving files one by one is very time-consuming. This article uses classification by the first 3 characters of the file name as an example to demonstrate how to use the office software HeSoft Doc Batch Tool to batch organize files with different prefixes like LON, NYC, PAR, SYD, TYO into corresponding folders, suitable for organizing various file types such as txt, doc, docx, xls, xlsx, pdf, and more.
In daily office work, many files are not generated by directories but are all piled into the same folder. For example, system-exported reports, customer data, order details, log files, and contract documents often use the first few characters of the file name to represent the source, city, project, or department. When file names are like LON10125384.txt, NYC10212343.txt, PAR10254549.txt, if you need to put LON into a LON folder, NYC into a NYC folder, and PAR into a PAR folder, manual drag-and-drop is not only slow but also prone to missing selections and misplacements.
This article addresses this problem: batch categorizing many files by placing them together based on the very first characters of their file names. In the example, the first 3 characters of the file name represent a classification identifier. After processing, folders like LON, NYC, PAR, SYD, and TYO will be automatically generated, and corresponding files will be moved or organized into the respective directories. The entire process is completed using the office software " HeSoft Doc Batch Tool ", which is positioned to help users process files in batches, reduce repetitive work, and improve office efficiency. It is particularly suitable for administrative, finance, operations, project management, and data processing personnel who frequently need to organize large numbers of files.
Applicable Scenarios: Which files are suitable for batch classification by starting characters
Classification by file name prefix is suitable for all scenarios where the file names themselves have a pattern. As long as the first few characters of a file name can represent a certain classification, you can consider using this method to organize files in batches.
For example, files starting with city codes: LON10125384.txt, NYC1010149.txt, PAR1023147.txt, can be categorized into LON, NYC, PAR based on the first three English letters. Another example is files starting with department codes: HR_EmployeeInfo.xlsx, FIN_ExpenseDetails.xlsx, MKT_ActivityPlan.docx, which can be archived by the first two or three characters. Project codes, customer codes, order batches, and date prefixes are also applicable.
Although the sample files in the screenshot are TXT text files, this sorting method is not limited to txt. Any regular computer file, such as Word documents (doc, docx), Excel spreadsheets (xls, xlsx), PowerPoint files (ppt, pptx), PDF files, images, compressed packages, log files, etc., can be categorized and organized according to file name patterns. The key is not the file extension, but whether the beginning of the file name has identifiable classification characters.
Result Preview: Files are mixed in the same directory before processing
Before processing, all files are located in the same folder. You can see that the file names start with different prefixes such as LON, NYC, PAR, SYD, TYO, but they are not placed separately. The larger the number of files, the greater the workload to manually browse file name prefixes and drag them into different folders.

From the screenshot, it is clear that the file names have a distinct pattern: the first three characters are the classification basis, followed by a string of numbers, and the extension is .txt. If you want to manage these files by city code or project code, the ideal result is to automatically place files with the same first three characters into a folder of the same name.
Result Preview: Classification folders are automatically generated after processing
After processing, the originally mixed files are classified by the first 3 characters of their file names, and the system automatically forms multiple folders. In the example, five classification folders—LON, NYC, PAR, SYD, and TYO—can be seen, each corresponding to a file name prefix.

This result is more suitable for subsequent searching, archiving, compression, backup, or handover. For example, if you need to view New York NYC files, you just need to enter the NYC folder; if you need to send Paris PAR materials separately to a colleague, you don't have to filter through a large number of files.
Step 1: Enter file organization and select "Classify files by file name"
After opening HeSoft Doc Batch Tool , select "File Organization" in the left-side function navigation. This module is designed for batch file management tasks, such as organizing files by rules like file name, extension, etc. Upon entering, select "Classify files by file name" from the function cards.

The purpose of this step is to tell the software that the current task to be executed is not modifying file names or converting formats, but batch categorizing files according to file naming rules. After selecting this function, the software will enter the corresponding wizard process, allowing you to subsequently import files, set the classification method, choose a save location, and start processing.
Step 2: Add or import files to be classified
After entering the "Classify files by file name" interface, the top of the page provides entry points like "Add Files" and "Import from Folder." If there are few files, you can click "Add Files" to select them manually; if all files are already gathered in one directory, it is more recommended to use "Import from Folder," which allows you to import all files from that folder into the processing list at once.

After files are imported, the software lists the pending records in a table. The table contains information like serial number, name, path, extension, creation time, modification time, and actions. Through these fields, you can confirm before processing whether the files are completely imported, the path is correct, and the extension matches expectations. In the screenshot, you can see the record count is 20, the file path is in the D:\test\ directory, and the extension is txt.
It is recommended to check two points in this step: first, whether only the files that need classification are imported, avoiding processing unrelated files together; second, whether the beginning of the file names indeed has a uniform rule. If some files lack the three-character classification identifier, or their naming method differs from other files, it is recommended to process them separately or adjust their file names first to avoid generating unexpected classification folders.
Step 3: Set classification by the first few characters
After confirming the file list is correct, click "Next" at the bottom to enter "Set Processing Options." In the classification method, select "Classify by the first few characters." This option is perfect for the scenario in this article: creating classifications based on the first few characters of the file name counted from left to right.

Enter the number of characters to extract in the "Count" input box. In the example, LON, NYC, PAR, SYD, TYO are all three English letters, so the count is entered as 3. This way, the software will read the first 3 characters of each file name and use these 3 characters as the name of the classification folder. For example, LON10125384.txt will be recognized as the LON category, and NYC10212343.txt will be recognized as the NYC category.
There are also options related to "Letter Case Conversion" at the bottom of the page; the screenshot shows it remains at "Default." If the original case of the prefixes in the file names is already uniform, keeping the default is fine. This helps preserve the original naming rules as much as possible, preventing a mismatch between classification names and business habits due to case conversion.
Step 4: Set save location and start processing
After setting the classification method, continue by clicking "Next." From the page flow, you can see subsequent steps include "Set Save Location" and "Start Processing." When setting the save location, it is recommended to choose an easily identifiable output directory, such as creating a "Classification Results" directory next to the original folder for easier verification after processing.
If the files are very important, it is recommended to back up the original files first, or test the classification effect with a small sample of files first. Especially when file naming rules are not completely uniform, testing first can prevent a large number of files from being sorted into unexpected directories.
After entering the final step, confirm that the processing rule is to classify by the first 3 characters of the file name, the number of pending files is correct, and the save location is correct, then execute the start processing. The software will batch create corresponding folders according to the settings and group files with the same prefix together. After processing is complete, open the output directory to see classification folders like LON, NYC, PAR, SYD, TYO.
Common Questions and Notes
1. What number should I fill in for count?The number depends on the character length at the beginning of the file name used for classification. If the classification identifier is a three-letter code like LON or NYC, fill in 3; if it's a two-letter department code like HR or IT, fill in 2; if it's a year-month prefix like 202606, you can fill in 4, 6, or other lengths as needed.
2. What if file name prefixes are not uniform?If some files start with LON and some with London, directly classifying by the first three characters might yield different results. It is recommended to first unify file naming, or process files with consistent rules in batches separately.
3. Can it process Word, Excel, and PDF files?The screenshots in this article use txt files as an example, but the core basis for classification by file name is the file name itself. As long as the file name has a pattern, office files like doc, docx, xls, xlsx, pdf, ppt, pptx are equally suitable for this batch organization approach.
4. Why is it recommended to back up first?The advantage of batch processing is handling a large number of files at once, but it also means that a setting error can affect many files. Backing up important materials before processing, or selecting a few samples to verify first, is a safer office habit.
5. Should I convert letter case?If the prefixes in the file names have both 'LON' and 'lon' spellings, the case might affect the final folder name. The screenshot's default selection is suitable when the prefixes are already standardized. If your actual file names have mixed cases, you can choose based on business needs using the case conversion options provided in the interface.
Summary: Replace repetitive dragging with batch file organization
Batch classification by the first few characters of file names is a very typical office automation and organization need. Previously, you had to manually create new folders, check file names one by one, and then drag and move them; now, through HeSoft Doc Batch Tool , you only need to import files, select "Classify by the first few characters," fill in the character count, and execute the process to quickly obtain clearly structured classification folders.
If your file names already contain information like city codes, department numbers, project numbers, or date prefixes, it is highly recommended to prioritize this method for organization. It not only saves a great deal of repetitive labor but also reduces the risk of human operational errors, making subsequent searches, archiving, and handovers much more efficient.