How to automatically classify a large number of name files by surname? A method to batch generate folders based on the first Chinese character of the file name


TranslationEnglishFrançaisDeutschEspañol日本語한국어Update Time2026-07-25 06:29:15

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 the filename starts with a name, you can quickly categorize by surname based on the first Chinese character. This article uses HeSoft Doc Batch Tool as an example to illustrate how to batch organize files with different formats, such as 陈杰, 陈静, 李娜, 王芳, 赵敏, into folders like 陈, 李, 王, 赵. The article includes the effects before and after processing, software operation steps, and precautions, suitable for reference by personnel in HR, academic affairs, administration, and document archiving.

HR files, student data, registration forms, scanned ID copies, contract attachments, and interview materials are often named after individuals. For example, Chen Jing.pdf, Li Na.pdf, Li Yangyang.docx, Wang Fang.docx, Zhao Min.csv, etc. When there are only a few files, you can manually create folders by surname and drag them in; but if a directory contains dozens, hundreds, or even thousands of files, manually sorting by surname becomes a high-frequency repetitive task that is both time-consuming and error-prone.

This article introduces a method more suitable for office scenarios: using HeSoft Doc Batch Tool to batch-classify a large number of files based on the first Chinese character in their filenames. Since the first character of a Chinese name is typically the surname, this method allows for quick archiving by surname. It can also uniformly process mixed materials like PDFs, Word documents (docx or doc), Excel spreadsheets (xlsx or xls), CSV files, zip archives, and Markdown documents in a single task.

Applicable Scenarios: Organizing Name-Based Files by Surname or First Character

The most typical application of classifying by the first Chinese character in a filename is organizing name-based files. For example, an administrative staff member receives a batch of employee documents with filenames containing names and formats; a school administrator receives student assignments with filenames starting with the student's name; a recruiter downloads candidate resumes where the filenames are the candidate's name plus job information. As long as the first Chinese character in the filename represents the classification basis, you can use this method for batch archiving.

The advantage of this method is that it does not require opening file contents or consistent file formats. Files can be PDF resumes, Word registration forms, Excel statistics, CSV data, or zip attachment packages. As long as filenames follow the rule, they can be processed using the same classification logic. It addresses repetitive operations at the file management level, with its core value being batch file processing, reducing manual dragging, and improving office efficiency.

Of course, classifying by the first Chinese character is not equivalent to classifying by a full name. It is more suitable for grouping by surname or first character. If you wish to archive by more complex rules such as full name, department, or project number, you need to choose other classification rules based on the file naming convention. This article focuses on the classification by first Chinese character as demonstrated in the screenshots.

Effect Preview: From Mixed File List to Surname Folders

Before Processing: All Files Scattered in the Same Folder

In the directory before processing, files are mixed together in list form. You can see the same batch of materials contains different extensions, such as zip, pdf, docx, md, and csv. Although the filenames all start with Chinese names, they are not sorted into surname folders, requiring repeated browsing in the list to find a particular type of file.

image-Name files are categorized by surname,file names are categorized by the first character,folders are generated in batches,files are moved in batches,docx files are organized,pdf files are archived,csv files are categorized

Taking the screenshot as an example, Chen Jie.zip and Chen Jing.pdf both start with Chen, Li Na.pdf and Li Yangyang.docx both start with Li, and Wang Fang.docx and Wang Hao.pdf both start with Wang. Manual organization requires judging these first characters one by one and placing files into corresponding locations. For those handling materials long-term, this type of work is highly repetitive but low in value, making it suitable for bulk completion by office software.

After Processing: Folders Formed by the First Chinese Character

After processing, the originally mixed files are organized into multiple folders, named Chen, Li, Wang, Yang, Zhang, and Zhao respectively. Each folder corresponds to a first Chinese character, and files with the same first character are placed together.

image-Name files are categorized by surname,file names are categorized by the first character,folders are generated in batches,files are moved in batches,docx files are organized,pdf files are archived,csv files are categorized

This directory structure is more suitable for subsequent review and distribution. For instance, if you need to view materials for someone surnamed Chen, just open the Chen folder; if you need to compile CSV files for someone surnamed Zhao, you can go directly to the Zhao folder. The more files there are, the more significant the efficiency improvement from batch classification becomes.

Operation Steps: Batch Categorizing by the First Chinese Character in Filename

Step One: Access the File Organization Feature in the Software

Open HeSoft Doc Batch Tool . The product name is displayed in the upper left corner. The left sidebar contains function navigation, including Home, Task Flow, All Tools, File Name, Folder Name, File Organization, Word Tools, Excel Tools, PowerPoint Tools, PDF Tools, etc. Since the current goal is to move and categorize files, you should enter File Organization.

image-Name files are categorized by surname,file names are categorized by the first character,folders are generated in batches,files are moved in batches,docx files are organized,pdf files are archived,csv files are categorized

On the File Organization page, choose to classify files by filename. This function is used to batch-create classification results based on character rules in filenames. Do not choose to classify files by extension, as this article's goal is not to separate pdf, docx, and csv into different folders, but to place files by the first Chinese character of the name, i.e., surname or first character, together.

Step Two: Import the Name Files to be Classified

After entering the "classify files by filename" section, the interface proceeds to the first step: selecting records to process. You can see options at the top of the page such as Add Files, Import Files from Folder, Clear, and More. If you only need to process a few specific files, use Add Files; if a directory contains a whole batch of materials, using Import Files from Folder is usually more convenient.

image-Name files are categorized by surname,file names are categorized by the first character,folders are generated in batches,files are moved in batches,docx files are organized,pdf files are archived,csv files are categorized

After importing, the software displays file information in a table, including Name, Path, Extension, Creation Time, and Modification Time. In the screenshot, a total of 10 records are imported, with file extensions including zip, pdf, docx, md, and csv. This list is very important; it acts as a confirmation page before batch processing. You can check if files are missing and confirm whether irrelevant files were added.

It is recommended to focus on checking the filename format in this step. Since the next step involves classifying by the first Chinese character, if a filename is "001-Chen Jing.pdf", the software will look for the first Chinese character in the filename; if a filename has no Chinese characters at all, it might not be suitable for the current rule. For more stable results, it's best to keep filenames uniform, such as placing the name first, followed by the material type or date.

Step Three: Select Classification by First Chinese Character

After confirming the records to process, click Next to enter the processing options setup. The page now displays the classification mode, which includes multiple single-choice rules. To achieve sorting by surname, select "Classify by first Chinese character." The red arrow in the screenshot has marked this option.

image-Name files are categorized by surname,file names are categorized by the first character,folders are generated in batches,files are moved in batches,docx files are organized,pdf files are archived,csv files are categorized

After selecting "Classify by first Chinese character," the software will use the first Chinese character in the filename as the folder name. For example, the first Chinese character recognized for "Chen Jie.zip" is Chen, and for "Chen Jing.pdf" it is also Chen, so both will go into the "Chen" folder; "Li Na.pdf" and "Li Yangyang.docx" will go into the "Li" folder; "Wang Fang.docx" and "Wang Hao.pdf" will go into the "Wang" folder. Different extensions will not affect classification; as long as the first Chinese character is the same, they will be grouped together.

On the same page, you can also see letter case conversion options. Since the current task involves Chinese characters, there is no need to convert to uppercase or lowercase; keep the default. Doing so ensures the classification names remain consistent with the Chinese first character without additionally altering the meaning of the filenames.

Step Four: Set the Save Location and Start Batch Processing

After completing the processing options, proceed to the next step. The subsequent steps in the wizard are setting the save location and starting the process. When setting the save location, it is recommended to choose a location clearly distinct from the original directory, such as creating a new "Organized Materials" folder. This allows for easier comparison of results before and after processing and facilitates subsequent archiving after confirmation of accuracy.

Before starting the process, you can review the number of task records and classification rules again. For important materials, it is suggested to first run a test with a small number of files to confirm that the generated folders like Chen, Li, and Wang meet expectations before processing the entire directory. After starting, the software will automatically complete the actions of creating folders and categorizing files according to the settings.

Frequently Asked Questions and Precautions

1. Will this method classify by full name?

No. The result of classifying by the first Chinese character is surname or first-character folders, such as Chen, Li, Wang, instead of Chen Jing, Li Na, Wang Fang. If your requirement is to create folders by full name, you need to choose a different processing method that aligns better with full name rules. This article's method focuses on quick first-character grouping.

2. Can it still process files if numbers or symbols precede the name?

Classification by the first Chinese character focuses on the first Chinese character that appears in the filename. If a filename contains numbers, hyphens, parentheses, etc., as long as a Chinese character follows, it is likely still possible to classify by that character. However, to reduce ambiguity, it is recommended to standardize naming formats before batch processing, especially for files collected collaboratively by multiple people.

3. Will different file formats under the same surname be separated?

They will not be automatically separated because of different extensions. In the example, Chen Jie.zip and Chen Jing.pdf will go into the same "Chen" folder, and Li Na.pdf and Li Yangyang.docx will go into the same "Li" folder. This precisely illustrates the difference between classifying by filename and classifying by extension. If you wish to classify by extension first, you can choose other file organization functions in the software.

4. How can I avoid losing track of original files after batch organization?

It is recommended to set a clear save location and confirm the output directory before processing. For important materials, you can keep the original folder or first copy a batch for testing. Batch tools can improve efficiency, but the prerequisite is that the rules and save location are clearly confirmed.

Summary: No Need to Drag Name Files Individually for Archiving; Batch Organization by First Character Saves Time

When a large number of files begin with names, classifying by the first Chinese character is an efficient and intuitive organization method. With HeSoft Doc Batch Tool , you only need to enter File Organization, select "classify files by filename," import the files, set the rule to classify by first Chinese character, then follow the wizard to set the save location and start processing. This will automatically sort different format materials into folders like Chen, Li, Wang, Yang, Zhang, and Zhao.

This method is especially suitable for personnel in HR, academic administration, general administration, finance, and project material management. It transforms the work of manually creating numerous folders and moving files into an executable, repeatable batch process. If you currently have a batch of PDFs, Word docx files, Excel spreadsheets, CSVs, or zip archives starting with names, you can first follow this article's steps to process a small sample, then execute batch categorization on the entire folder.


KeywordName files are categorized by surname , file names are categorized by the first character , folders are generated in batches , files are moved in batches , docx files are organized , pdf files are archived , csv files are categorized
Creation Time2026-07-25 06:29:00

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!