When dealing with large numbers of txt text files, many users need to quickly know the number of lines, characters, encoding, and the file path where each file is saved. This article demonstrates how to enter file information statistics, import txt files from a folder, select detailed text file information, and generate a filterable and sortable Excel statistical table in HeSoft Doc Batch Tool , helping office workers reduce the time spent repeatedly opening files.
Many seemingly simple office tasks can be very time-consuming when actually performed. For example, a folder contains a batch of txt Notepad files, and your leader or client asks you to organize a list containing the file path, file name, size, creation time, modification time, text encoding, number of text lines, and number of text characters for each txt file. Checking a single file is not difficult, but when the number of files is large, manual statistics become inefficient and repetitive labor.
A common practice is to first copy the file name in the file explorer, then open each txt to view the content, or use different tools to calculate the line count and view the encoding separately, and finally paste the data into Excel. This process not only has scattered steps but is also prone to affecting results due to copying the wrong line, missing files, or inconsistent encoding judgments. For users who need to conduct document acceptance, text data verification, or document archiving, it is more recommended to use the batch processing capabilities of office software to generate a standardized Excel file list at once.
Below, using HeSoft Doc Batch Tool as an example, we will fully explain how to batch count the number of lines, characters, text encoding, and path information of txt files. This software is positioned for batch document and file processing, suitable for handling repetitive tasks in office files such as Word, Excel, PPT, PDF, text, and images. This article focuses on using its file information statistics function.
Applicable Scenarios: From Folder Lists to Text Quality Checks
Batch counting txt files and exporting to Excel is more widely applicable than many people imagine. As long as you need to quickly understand the basic situation of a batch of text files, you can use this method.
In data management, txt files can be course notes, reading excerpts, work logs, meeting minutes, or explanatory text exported from systems. When files are scattered in folders, lacking a unified catalog, it is difficult to determine which files have more content, which have been recently modified, and which might be empty. By counting the number of lines and characters, you can quickly identify the file volume; by counting the path, you can quickly locate the original file.
In data processing and system import scenarios, text encoding is particularly important. For the same txt file, some might be utf-8, some might be gb18030, and encodings like utf-16, windows-1252, or us-ascii might also appear. If these txt files need to be imported into databases, scripts, business systems, or other tools later, inconsistent encoding can cause garbled characters. Summarizing the encoding into Excel first allows risks to be identified in advance.
In project delivery scenarios, the Excel list can be submitted as an attachment. Compared to just submitting a bunch of txt files, including a detailed table containing path, size, time, number of lines, and number of characters makes it easier for the recipient to check the file quantity and content scale.
Result Before Processing: Only Scattered txt Files in the Folder
In the folder before processing, you can see many txt text files, such as ReadingJournalNotes.txt, VocabularyPracticeText.txt, GrammarReviewLines.txt, StudyPlanningNotes.txt, etc. The file list can show names and times but cannot directly tell us how many lines and characters each file has, nor can it directly display the text encoding.

If you need to count all the file information at this point, the manual method requires repeatedly opening, viewing, and recording. For content managers, these operations are not complex but are very time-consuming; for tasks requiring accuracy, manual recording is also hard to keep error-free.
Result After Processing: Centralized Display of Path, Encoding, Lines, and Character Count in Excel
After using the file information statistics function, an Excel summary table is generated. Each row in the table corresponds to a txt file, and each column corresponds to a type of file information. The screenshot shows that the results include not only path, name, extension, size, containing folder, creation time, and modification time, but also Text - Text Encoding, Text - Line Count, and Text - Character Count.

With this Excel sheet, subsequent work becomes much easier. For example, to find the file with the most lines, you can sort the text line count column; to check for abnormal encodings, you can filter the text encoding column; to locate a file, you can copy the address in the path column; to understand the approximate content volume of each file, you can view the character count column. This is the value of batch processing tools compared to manual operation: centralizing scattered information into a structured table simplifies subsequent analysis.
Operation Step 1: Open HeSoft Doc Batch Tool and Select File Information Statistics
After starting HeSoft Doc Batch Tool , select File Organization in the left navigation. This category provides multiple functions for batch file organization, among which the one corresponding to this requirement is File Information Statistics.

As seen from the screenshot, the file information statistics function is used to batch count the name, path, size, time, and metadata information of various files. The metadata information here can be understood as extended information related to the file itself or file content. For txt files, the text encoding, line count, and character count we care about belong to the text information that needs additional counting.
After selecting this function, you enter the specific processing page. The page uses a step-by-step process, completing tasks sequentially: selecting the records to process, setting processing options, setting the save location, and starting processing. This process is suitable for batch file operations because each step allows users to clarify the current purpose, reducing operational errors.
Operation Step 2: Import the txt Files to be Counted
After entering the file information statistics page, first add the txt files to be counted to the processing list. The top of the page provides two main entry points: Add Files and Import Files from Folder. If files are scattered in different locations, you can select them via Add Files; if files are all in the same directory, it is recommended to use Import Files from Folder, which is more suitable for batch processing.

After import is complete, the list will display the sequence number, name, path, extension, creation time, and modification time for each file. The bottom of the screenshot shows the record count is 20, indicating that 20 files to be counted have been imported. At this step, users should focus on confirming three things: first, whether the record count matches expectations; second, whether the extension is txt; third, whether the path is the target folder.
If you find files in the list that do not need to be counted, you can use the delete entry in the operation column to remove them. If the overall import result is incorrect, you can click Clear and re-select. After confirming there are no errors, click Next. The expected result at this point is that the software has obtained the complete file list and can proceed to set which additional information needs to be counted.
Operation Step 3: Select Text File Details in Additional Information
After entering the Set Processing Options page, you can see the Additional Information area. Detailed information options for multiple file types are listed here, including Word file details, Excel file details, PPT file details, PDF file details, text file details, and image file details.

Since the goal this time is to count the encoding, line count, and character count of txt Notepad files, you should check Text File Details. Once checked, the software will perform more in-depth statistics on text files during processing, rather than just outputting common file attributes.
If users are processing doc, docx, xls, xlsx, ppt, pptx, pdf, etc., files simultaneously, they can also check other details as needed. However, to keep the result table cleaner, if this task only involves txt, it is recommended to keep only the text file details checked. This way, the exported Excel table will be more focused, making reading and filtering more convenient.
After completing the selection, click Next to enter the save location settings. At this point, the software has clarified that text-related fields need to be included in the results this time.
Operation Step 4: Choose Result Save Location and Generate Excel Statistics Sheet
In the Set Save Location step, follow the page prompts to select the saving directory for the Excel result file. It is recommended to save the result in the project directory related to the original txt files, or in a dedicated statistics result folder, to avoid being unable to find the output file later.
After entering the Start Processing step, the software will batch read the txt files in the list, count the basic file information and text details, and summarize the results into an Excel spreadsheet. The entire process does not require users to open files one by one or manually copy paths or count lines.
Once processing is complete, open the generated Excel file to see a table similar to the effect preview. At this point, you can filter, sort, adjust formats, and save for archiving according to actual needs. For example, if the time column is not displayed fully, you can widen the column appropriately; if the path column is too long, you can also adjust column width or enable text wrapping.
How the Excel Result Table Can Be Used
First, it can serve as a file catalog. The path and name columns allow users to quickly know where each txt file is located, and the containing folder name and path are suitable for project archiving.
Second, it can serve as content volume statistics. The text line count and character count can help determine if file content is complete. For instance, if a file's character count is significantly smaller than other files, it may need checking for export failure; if a file's line count is abnormally large, it may need checking for duplicate content.
Third, it can serve as an encoding check table. The text encoding column provides an intuitive view of the encoding type for each file. If a batch of materials mixes multiple encodings and they need to be uniformly imported into a system later, you can first filter out files with non-target encodings and then arrange for conversion or review.
Fourth, it can serve as a delivery basis. When submitting files externally, including an Excel list enhances readability and verifiability. The recipient can understand the file quantity, size, time, and text scale without opening each txt file.
Frequently Asked Questions and Notes
1. Do all txt files need to be placed in the same folder before processing? Not necessarily, but placing them in the same folder makes it easier to add them all at once using Import Files from Folder. If files are scattered, you can also use Add Files to add them in batches.
2. Why are there multiple encoding types in Excel after processing? This indicates that these txt files may come from different software, systems, or export methods. Different encodings don't necessarily mean files are problematic, but if the subsequent processing environment requires a unified encoding, special attention needs to be paid.
3. What is the difference between line count and character count? Line count reflects how many lines the text is divided into, suitable for checking record quantity or paragraph scale; character count reflects the total length of the text, suitable for judging content volume. Viewing both together makes it easier to spot abnormal files.
4. What if the file path is too long and affects readability? After exporting to Excel, you can adjust column width, freeze the top row, enable filtering, or copy the path to locate the file in the file explorer. Long paths are a common situation in file lists and do not affect the statistical results.
5. Is this method only suitable for txt files? This article uses txt as an example because the goal is to count text encoding, line count, and character count. The software page also displays detailed options for Word, Excel, PPT, PDF, images, etc. In actual use, you can select the corresponding option based on the file type.
Summary: Leave Text Statistics Work to Batch Processing Tools
When the number of txt files is large, opening them one by one to view the line count, character count, and encoding is not suitable for office scenarios. A more efficient method is to use the file information statistics function of HeSoft Doc Batch Tool , batch import the txt files from the folder, check Text File Details, and then generate an Excel summary table.
This approach not only saves a significant amount of time on repetitive operations but also makes the statistical results more uniform and easier to review. Whether you are organizing study materials, checking log texts, preparing project delivery, or checking text encoding consistency, you can first generate an Excel list and then complete subsequent analysis based on the table. For users who frequently handle a large number of files, this type of batch office software can significantly improve efficiency.