When organizing a large number of txt text files, the most troublesome part is often not the files themselves, but how to quickly generate a complete inventory. This article uses batch statistics of TXT files as an example to demonstrate how to import Notepad files from folders using HeSoft Doc Batch Tool , select detailed information for text files, and export an Excel spreadsheet containing file paths, extensions, sizes, creation times, modification times, text encodings, text line counts, and text character counts, helping users efficiently complete data inventory and text data checks.
Many office scenarios accumulate a large number of TXT text files: study notes, meeting minutes, training materials, log snippets, copy drafts, text records exported from systems, etc. They usually appear as ordinary Notepad files, but when you need to organize them into a list, numerous problems arise: Which paths are the files distributed in? How many lines does each file have? What is the approximate character count? Are there file encoding inconsistencies that could cause garbled text during subsequent imports? If you open each txt file to check and then manually copy the information into Excel, it is not only time-consuming but also difficult to ensure accuracy.
A more realistic problem is that data organization tasks for many teams are not one-off. Today, you might need to compile statistics for 20 txt files; tomorrow, it could be 200. Today, you only need file names and paths; later, you might also need line counts, character counts, and encoding. For such repetitive, rule-based office tasks, using batch processing tools is more reliable than manual operation.
This article will introduce a practical method: using the "File Information Statistics" function of HeSoft Doc Batch Tool to export the path, name, extension, size, time, text encoding, text line count, and text character count of multiple TXT files to Excel at once. Its value is not just "generating a table" but, more importantly, turning scattered files into structured data, convenient for subsequent filtering, sorting, archiving, and checking.
Applicable Scenarios: Why Summarize TXT File Information into Excel
TXT files have a simple structure, but management costs rise rapidly as their numbers increase. Batch exporting TXT file information to Excel can save significant time in the following scenarios.
Material Inventory: Quickly Identify Available Text Files
When a directory contains many text materials, the file explorer can only display basic information and is inconvenient for filtering and statistics. After exporting file information to Excel, you can clearly see each file's name, path, containing folder, creation time, and modification time, making it suitable as a material inventory list.
Content Check: Locating Excessively Long, Short, or Empty Files
Using the "Text - Line Count" and "Text - Character Count" columns, you can quickly assess the content volume of each txt file. For example, files with significantly low character counts might indicate missing content; files with abnormally high line counts might be logs or batch records. Sorting and filtering in Excel is much more efficient than manually opening files for inspection.
Encoding Troubleshooting: Identifying Garbled Text Risks in Advance
TXT files lack the strong format containers of formats like Word, docx, or xlsx, so encoding differences often cause reading errors. Especially during system imports, script processing, or cross-platform transfers, inconsistencies in encodings like utf-8, gb18030, utf-16, windows-1252, and us-ascii can lead to garbled Chinese characters or the loss of special symbols. Batch counting text encodings first allows for early risk detection.
Handover and Archiving: Providing a Searchable List to Recipients
During material handover, merely packaging a folder is insufficient. Recipients often need to know the location, update time, and approximate content scale of each file. An Excel list can serve as a handover attachment, making the file structure more transparent.
Subsequent Analysis: Turning File Management into Spreadsheet Management
Once the information is in Excel, you can continue using features like filtering, sorting, pivot tables, and conditional formatting. For example, grouping by folder path, categorizing by encoding, tallying text volume by character count, or filtering for recently updated files by modification time.
Preview Effect: From Folder Listing to Excel Statistical Report
Before Processing: Multiple TXT Files Scattered in a Folder
In the pre-processing screenshot, a folder contains multiple txt text files, including ReadingJournalNotes.txt, VocabularyPracticeText.txt, GrammarReviewLines.txt, StudyPlanningNotes.txt, CourseSummaryText.txt, LearningGoalsDraft.txt, etc. At this point, users can see file names and times, but not the internal line counts, character counts, or text encodings.
If a complete list is needed, the manual approach typically involves repeatedly performing operations like "open file, view info, copy file path, record in Excel." For a large volume of TXT Notepad files, such repetitive labor has no technical difficulty but consumes significant time.

After Processing: Complete Statistical Fields Automatically Generated in Excel
The post-processing screenshot shows the exported Excel result. Each row in the table corresponds to a TXT file, and each column corresponds to a type of statistical information. Visible fields include Path, Name, Name (without extension), Extension, Size (bytes), Size, Containing Folder Name, Containing Folder Path, Creation Time, Modification Time, Text - Text Encoding, Text - Line Count, Text - Character Count.
This type of table is more valuable than a regular file list. For instance, when you need to check encodings, you can filter the "Text - Text Encoding" column directly; when comparing content volumes, you can sort by "Text - Character Count"; when locating a file, you can view the "Path" or "Containing Folder Path."

Steps: Batch Counting TXT Files and Exporting to Excel
Based on the workflow shown in the screenshots, the following explains how to complete the statistics in HeSoft Doc Batch Tool . The software interface uses a wizard-based step approach, suitable for office users who prefer not to write scripts or manually create lists.
Step 1: Open "File Information Statistics" under "File Management"
After launching the software, functional category navigation is on the left. The screenshot shows the current software is HeSoft Doc Batch Tool . On the left, categories like File Management, Word Tools, Excel Tools, PowerPoint Tools, PDF Tools, Text Tools, and Image Tools are visible. This task aims to batch count file properties and detailed text information, so File Management needs to be selected.
In the File Management functional area, find "3. File Information Statistics". The description next to this function card indicates it can batch count information such as names, paths, sizes, times, and metadata for various files. This "File Information Statistics" is the entry point for generating the TXT file list.

After clicking to enter, the software opens the File Information Statistics operation page and guides the user through importing files, setting options, setting the save location, and starting processing. Selecting the correct function is the first step; all subsequent statistical fields depend on this entry point.
Step 2: Add Files or Import TXT Files from a Folder
After entering the "File Information Statistics" page, multiple buttons are provided at the top. In the screenshot, operations like Add Files, Import Files from Folder, Clear, and More are visible.
If the TXT files to be counted are already gathered in the same folder, clicking Import Files from Folder is recommended. This allows batch addition of files within the folder to the processing list, avoiding individual selection. If files are scattered across multiple locations, you can also use "Add Files" to include them in batches.
After importing, the list displays the pending records. The screenshot shows each record contains fields like Index, Name, Path, Extension, Creation Time, and Modification Time. For example, the path for ClassNotesArchive.txt shows D:\test\folders\ClassNotesArchive.txt, with the extension txt. The bottom shows "Record Count: 20," indicating there are currently 20 files awaiting statistics.

At this step, it is advisable to carefully check three things: first, whether the file count matches expectations; second, whether the extensions are txt, to avoid mistakenly adding files of other formats; third, whether the paths point to the correct directory. If errors are found during import, you can use the delete operation in the list to remove single records, or click "Clear" to re-import.
After confirming the file list is correct, click Next at the bottom to proceed to the processing options settings.
Step 3: Select "Text File Detailed Info" as an Additional Statistical Item
The second wizard page is "Set Processing Options." The screenshot shows the "Additional Information" area, with multiple checkboxes below, including Word File Details, Excel File Details, PPT File Details, PDF File Details, Text File Details, and Image File Details.
Since the objects of this statistical task are TXT text files, and we need to get text encoding, line count, and character count, the Text File Details option must be checked. This option is selected in the screenshot, indicating the exported result will include fields related to text content.

Note here carefully: basic file properties and text detailed information are not the same type of data. Path, name, extension, size, creation time, and modification time are basic file information; while encoding, line count, and character count require reading the text content to be calculated. Therefore, if the goal is to "batch count txt line counts and character counts," do not overlook checking "Text File Details."
After completing the settings, continue by clicking Next.
Step 4: Set the Result Save Location
The wizard top shows the third step as "Set Save Location." In this step, you need to specify where the statistical results should be exported. For easier future retrieval, it is recommended to save the results in a project directory related to the source files, such as folders named "TXT Statistics Results," "Material List," or "File Inventory Table."
The choice of save location affects subsequent management. If it's a temporary check, you can save it on the desktop; if it's for project archiving, saving it in the project folder with an easily recognizable file name is suggested. This way, you won't need to search for the output table again when re-checking the file list later.
Step 5: Start Processing and View the Excel Summary Results
After setting the save location, proceed to the fourth step, "Start Processing." The software will, based on the previously imported file list, batch read the basic properties of each TXT file and, with "Text File Details" checked, calculate the text encoding, line count, and character count. After processing is complete, open the generated Excel table to view the full statistical results.
Upon opening the result table, it is recommended to check the following first: whether the total row count matches the number of imported files; whether the Extension column contains only txt; whether the text encoding column shows multiple encodings; whether any line counts or character counts are abnormal; and whether the Path column corresponds to the source files.
How the Exported Excel Spreadsheet Can Be Used
Many users simply save the generated statistical table. In reality, this Excel report can play a much larger role.
Filter by Text Encoding to Identify Garbled Text Risks
In the post-processing screenshot, the "Text - Text Encoding" for different files may vary, e.g., utf-8, gb18030, windows-1252, utf-16, us-ascii, etc. Users can enable filtering on this column in Excel to quickly see which file encodings are inconsistent with mainstream requirements. If the subsequent system requires a unified utf-8 encoding, you can filter for files with other encodings first for processing.
Sort by Character Count to Identify Content Volume Differences
"Text - Character Count" is suitable for judging file content volume. You can sort by character count from largest to smallest to find the longest texts; or sort from smallest to largest to check for empty files, files with incomplete content, or abnormally short texts.
Count by Line Count, Suitable for Log and Data Record Files
If a TXT file contains one record per line, the line count can basically reflect the number of records. After exporting the line count to Excel, you can quickly assess the data volume of each file, providing a basis for subsequent splitting, importing, or sampling.
Group by Path and Folder to Organize Directory Structure
The exported table contains both "Path" and "Containing Folder Path." This is very useful for organizing materials across multiple directories. You can sort by folder path to see which files are in the same directory, or create a directory index based on the path.
Combine Creation Time and Modification Time to Assess Update Status
Creation time and modification time can help users determine the newness or oldness of files. If you need to organize recently updated text materials, you can sort directly by modification time. For archiving historical materials, you can also filter by time range.
FAQ and Precautions
1. If I only want to count txt files, do I need to filter them before importing?
If the target directory contains only txt files, importing directly from the folder is fine. If the folder also contains doc, docx, xlsx, pdf, image, or other files, it is recommended to check the Extension column after importing to confirm that only the required TXT files are kept. Different file formats require different additional information options; the focus this time is on text file details.
2. Why does the exported time display incompletely in Excel?
Sometimes, insufficient Excel column width might cause it to display as "#######". This is usually just a display width issue; you can drag the corresponding column wider or adjust the cell format to view the full date and time.
3. Why don't the text character count and file size match completely?
Character count represents the number of characters in the text content, while file size represents the number of bytes the file occupies. Under different encodings, the same character might occupy a different number of bytes, so character count and file size won't always be equal. This difference is even more common, especially for TXT files containing Chinese characters, special symbols, or different encoding formats.
4. Will the original TXT files be modified before counting?
Judging from the functional purpose, "File Information Statistics" is mainly used to read and summarize file information and generate an Excel report, not to modify text content. However, for important materials, it is recommended to keep backups before any batch processing and to test the results with a small number of files first.
5. Are the statistical results suitable for long-term storage?
Yes, they are suitable. The exported Excel can serve as a snapshot of the files at a specific point in time. If files are later added, deleted, or modified, you can run the statistics again and compare with the old table to understand the changes.
6. If there are many files, how can I ensure none are missed in the statistics?
It is recommended to check the record count after importing and to review the paths and extensions in the list. After processing, compare the number of data rows in Excel with the number of records imported in the software. For TXT files scattered across multiple directories, you can import them in batches or generate lists separately by directory.
Summary: Turning Numerous TXT Files into Analyzable Excel Data
Batch counting TXT file paths, line counts, character counts, and text encodings is essentially organizing scattered files into a structured table. Doing this work manually is often time-consuming, repetitive, and error-prone. Using the "File Information Statistics" function of HeSoft Doc Batch Tool allows you to chain the steps of importing files, selecting text details, setting the save location, and exporting to Excel, significantly reducing operational costs.
Through the exported Excel, users can not only see where each TXT file is located but also know its encoding, line count, character count, size, and time information. Whether for material inventory, encoding checks, text content audits, or project handover, this statistical list can provide direct assistance.
If you are facing a batch of txt Notepad files that need organization, you can follow the steps in this article to first import the folder, check "Text File Detailed Info," and then generate the Excel report. Compared to opening files one by one to record information, batch processing can complete the statistical work more quickly and reliably, leaving time for the tasks that truly require judgment and analysis.