If you want to uniformly delete certain specified texts from multiple TXT files, you can use the method of batch find and replace with empty content. This article focuses on the text tool of HeSoft Doc Batch Tool , explaining how to select "Find and replace keywords in text", batch import txt files, fill in Product A, Michael Anderson and other content in the list of keywords to be found, and leave the list of replaced keywords empty, so as to batch delete specified texts. It is suitable for text cleaning, data anonymization, obsolete word deletion, and batch office organization.
Many people think that deleting text from TXT files can only be done manually: open a file, search for a word, delete it, save, then open the next file. This method is acceptable when the number of files is small, but when a folder contains a large number of txt texts, manual processing becomes very inefficient. Especially when the same keyword may appear multiple times in each file with varying positions, manual checks can easily lead to omissions.
A more efficient approach is to use "batch find and replace with empty". Replacing with empty means using the text to be deleted as the find content and leaving the replace content empty. This way, the software locates these texts during processing and replaces them with empty content, effectively achieving deletion. This article, combined with screenshots, introduces how to use the office software " HeSoft Doc Batch Tool " to perform batch find and replace with empty in TXT files, quickly deleting specified text across multiple text files.
Applicable Scenarios: Why Use "Replace with Empty" to Delete Keywords
In office scenarios, TXT files are often used to save exported data, meeting minutes, product descriptions, system logs, temporary copy, batch-generated reports, and other content. Although these files have a simple format, handling them becomes more difficult when their quantity is large. For example, if you need to delete old product names, project codes, personnel names, customer names, signature information, or fixed instructions from all texts, editing them one by one is time-consuming and makes consistency checks inconvenient.
The advantage of "batch find and replace with empty" lies in its clear rules. Users simply tell the software which keywords to find and leave the replacement content blank, and the software processes all imported text files according to the same rule. For the unified cleanup of large numbers of txt, Notepad files, and text data, this is more stable than manual operation and better aligns with the value of office software in batch file processing, reducing repetitive labor, and improving efficiency.
Effect Preview: Before Replacing with Empty, Text Contains Multiple Specified Words
In the screenshot before processing, the file Product A.txt contains multiple items of content to be deleted. Red boxes highlight "Product A" and "Michael Anderson". "Product A" appears multiple times in different paragraphs of the main text, and "Michael Anderson" appears both within sentences and in the signature position. Manually deleting such text would require repeated searches and could easily miss the final signature.

The key for this type of task is not editing capability but batch capability. Since each file needs the same deletion rule applied, it is more suitable for completion with a batch processing tool. As long as the keyword list is set correctly, the software can repeatedly execute find and replace with empty across multiple txt files, reducing manual repetitive labor.
Effect Preview: After Replacing with Empty, Specified Text Is Deleted
The screenshot after processing shows that the positions where "Product A" and "Michael Anderson" originally appeared no longer display the corresponding text. Other content in the main text is preserved, indicating that this processing only targeted the specified keywords and did not delete entire paragraphs of text. For batch deletion of fixed text, this is the actual effect of "replacing with empty".

From the results, it's evident that replacing with empty is suitable for processing clear text fragments. If you wish for completely natural text cohesion after deletion, you need to consider spaces before and after keywords in advance. For example, deleting an English project name might leave extra spaces before or after; deleting a signature might leave the signature area empty. These are normal phenomena after text cleanup and can be addressed with a secondary tidying up based on delivery requirements.
Operation Steps: Batch Find and Replace with Empty to Delete Specified TXT Text
Step 1: Open the Text Tool and Enter the Find and Replace Function
Open HeSoft Doc Batch Tool and select "Text Tool" from the left navigation bar. As seen in the screenshot, the Text Tool provides multiple batch functions related to text files. Since the goal here is to delete specified text from texts, select "1. Find and Replace Keywords in Text".
The reason for choosing this function is clear: it can batch find keywords in text file content and replace them with user-specified content. When the replacement content is left blank, it effectively deletes the found keywords. Compared to directly editing a single txt file, this method is more suitable for processing multiple files.

Step 2: Import the Text Files to Be Batch Processed
After entering the function, the first step is "Select records to be processed". At the top of the page, "Add File" and "Import Files from Folder" are provided. If you have only a few files, you can use "Add File"; if you have many files all located in the same folder, using "Import Files from Folder" is more convenient.
The screenshot shows multiple imported txt records, with the table displaying serial number, name, path, extension, creation time, modification time, and actions. File names include Product A - Copy (2).txt, Product A - Copy (3).txt, etc., with the extension txt. The purpose of this step is to add all text files requiring unified keyword deletion to the pending processing list.

After importing, it is recommended to check the list first to ensure no incorrect files are selected. Because batch processing applies the same rules to all files in the list, accidentally importing unrelated files could cause unnecessary modifications. After confirming, click "Next" at the bottom.
Step 3: Select Exact Match to Control the Deletion Scope
After entering "Set processing options", you first see "Search mode". In the screenshot, "Exact text match" is selected. For deleting fixed text, exact matching is a relatively safe choice. For example, if the content to be deleted is Product A and Michael Anderson, entering the complete strings and using exact matching makes the processing scope more predictable.
If you choose fuzzy matching and the rules are not set properly, it might match content you didn't intend to delete. Therefore, when batch processing many files, it's recommended to prioritize clear, specific keywords. Only consider other search modes when you genuinely need to match text based on a certain pattern.
Step 4: Fill in the Keyword List to Find
In the "Keyword list to find", enter the text to be deleted line by line. The screenshot shows Product A on the first line and Michael Anderson on the second. It's crucial to note here that spaces within the keywords are also part of the matching content. For example, there is a space between Product and A, so it should be entered exactly as in the original text.
If you want to batch delete Chinese words, you can input them in the same way. For instance, project codes, company abbreviations, customer names, department names, etc., can all be entered line by line. Each line represents an independent search target. The more files there are, the more apparent the efficiency advantage of configuring once and executing across multiple files becomes.
Step 5: Keep the Replacement Keyword List Empty
On the right is the "Replacement keyword list". In the screenshot, this area is empty, and the interface prompts "Leave blank to delete". This is the core setting of this tutorial: to delete keywords, do not fill in replacement words on the right. During processing, the software replaces the content found on the left with empty content.

If your goal is not deletion but changing old words to new ones, you would need to fill in the corresponding new content on the right; but since the goal here is batch deletion, keeping it blank is sufficient. After completing the settings, click "Next" to proceed to the save location settings and start the processing workflow.
Step 6: Set the Save Location and Start Processing
As seen in the interface workflow, the entire task is divided into four steps: "Select records to process", "Set processing options", "Set save location", and "Start processing". The screenshot shows the first two steps; subsequent operations follow the software interface instructions. It is recommended to choose a new output directory when setting the save location. Especially during the first processing run or when rules are not yet fully confirmed, avoid directly overwriting the original files.
After starting the process, the software performs find and replace with empty on each txt file according to the previously imported file list and keyword rules. Upon completion, you can open the output files for verification, checking whether the specified text has been deleted and whether other content remains normal.
Frequently Asked Questions or Notes
1. What’s the difference between replacing with empty and regular deletion?
In terms of results, replacing with empty is deletion. The difference lies in the operation method: manual deletion requires opening the file and manually selecting text, whereas batch replacing with empty lets the software automatically find and clear based on rules. For multiple files, it's much more efficient and helps maintain consistent processing rules.
2. Why were some keywords not deleted?
A common reason is that the entered keyword does not exactly match the original text. For example, differences in case, spaces, punctuation, or the presence of line breaks in the original text causing the string to be non-contiguous. In such cases, you can open the original file, copy the precise content, and paste it into the keyword list. If English case is inconsistent, you can pay attention to the "Ignore letter case" option as needed.
3. Will this affect doc, docx, or PDF files?
The screenshots in this article show the processing of txt text files under the Text Tool, and the extensions in the import list are also txt. If you need to process Word documents like doc or docx, or handle PDF files, you should select the appropriate functions under the corresponding Word Tool or PDF Tool in the software. Do not mix processing methods for different formats, as this may not achieve the expected results.
4. Is it okay if the keyword is too short?
Technically, you can enter shorter keywords, but it is not advisable to casually delete overly short content. For example, deleting a single letter, a single common Chinese character, or a common symbol could significantly impact a large amount of normal text. When batch deleting, the more specific the keyword, the safer. It is recommended to use complete project names, full names, complete codes, or complete phrases.
5. Should I back up before processing?
Backing up is recommended. The value of a batch processing tool lies in processing many files at once, but this also means a wider impact if rules are wrong. Keeping a copy of the original files or saving the processing results to a new location makes the operation safer. If the results do not meet expectations, you can modify the keyword list and reprocess.
Summary: Turning Deleting Specified Text into a Repeatable Batch Process
Batch find and replace with empty in TXT files is an efficient method for deleting specified text across multiple text files. Using HeSoft Doc Batch Tool , users can select "Find and Replace Keywords in Text" within the Text Tool, import multiple txt files, fill in the keywords to find, and leave the replacement keyword list empty to complete batch deletion.
For office tasks such as project data cleanup, personnel information desensitization, old terminology removal, and batch copy editing, this method can significantly reduce repetitive labor. It is recommended to organize the keyword list beforehand, confirm the file scope, prioritize exact matching, and save the results to a new directory. This enhances efficiency while ensuring that batch text processing is safer and more controllable.