This article explains how to use the text tools in office software to batch delete specified keywords from multiple TXT text files. In the example, you need to remove content like Product A and Michael Anderson from a large volume of text. Manually opening files one by one to find and delete is inefficient and prone to omissions. With the "Find and Replace Keywords in Text" feature of HeSoft Doc Batch Tool , you can import multiple txt files at once, leave the replacement content blank, and achieve batch deletion of keywords. It is suitable for scenarios such as project name cleanup, personnel information anonymization, and template text organization.
In daily office work, many teams encounter this requirement: a folder contains dozens or even hundreds of TXT text files, and each file includes the same project name, customer name, personnel name, old version term, or other keywords that are no longer desired. If you open Notepad files one by one, manually find, delete, and save, it is not only time-consuming but also prone to omissions due to missed sightings, case differences, or excessive repetitions.
The problem this article aims to solve is: How to batch delete keywords in many text files. The office software used here is " HeSoft Doc Batch Tool " shown in the screenshot. Its positioning is a document batch processing software oriented towards office scenarios, and its core value lies in processing multiple files at once, reducing repetitive labor. For TXT, text materials, log snippets, exported documentation, etc., when you need to uniformly delete certain text, you can use the "Find and replace keywords in text" function to replace specified keywords with empty, thus achieving batch deletion.
Applicable Scenarios: When Do You Need to Batch Delete Keywords in Text Files
Batch deletion of keywords in TXT text is common in the following types of office scenarios. The first type is data desensitization, for example, before sending out text reports, test logs, or project meeting minutes, you need to delete information such as personnel names, customer names, and internal project codes. The second type is unified copy cleanup, for example, multiple product introduction files all contain an old product name that needs to be removed or retained for later re-editing. The third type is data organization, for example, batch TXT files exported from a system contain fixed prefixes, fixed signatures, or fixed identifiers that need to be uniformly deleted before importing into other systems. The fourth type is template updates, for example, many historical texts contain brand names, department names, or responsible person names that are no longer in use and need batch cleaning.
In the screenshot example, the text file before processing is named Product A.txt, and the body text contains "Product A" multiple times, and also features "Michael Anderson". If there was only one file, manual processing might be acceptable; but if there are dozens of similar files, deleting them one by one becomes low-value repetitive labor. After using a batch processing tool, you only need to configure the search keywords once and keep the replace-with keyword list empty to execute the deletion uniformly for multiple imported TXT files.
Effect Preview: Before Processing, Contains Multiple Keywords to Delete
Below is the effect before processing. As can be seen, "Product A" appears multiple times in the text content, and "Michael Anderson" appears in the body text and signature area. This content is marked with red boxes, representing keywords that need to be deleted from the text. For this type of recurring text, relying solely on manual browsing makes it easy to miss an occurrence in the middle or end of the text.

From an office processing perspective, this requirement is not a simple single edit, but "multiple files, same rule, repetitive operation." Therefore, it is better suited for completion by batch processing software. Users only need to be clear about two things: first, which text files need to be processed; second, which keywords need to be deleted. The subsequent finding, replacing with empty, and saving results can all be completed in batches according to the process.
Effect Preview: Keywords Have Been Batch Deleted After Processing
Below is the effect after processing. The positions where "Product A" originally appeared have been deleted, and the positions where "Michael Anderson" originally appeared are now blank. As can be seen, the overall structure of the text is still preserved, and other unrelated content remains unchanged. For scenarios requiring batch cleaning of project names, person names, company names, numbers, or fixed phrases, this method of "find specified text and replace with empty" is very intuitive.

It should be noted that after deleting keywords, spaces, punctuation, or partial blanks may remain in the original position. This is a normal result after text replacement with empty. Whether to further organize extra spaces depends on the actual document requirements. If the goal is just to remove sensitive words or project names, the current result usually meets the needs; if the sentences need to be completely smooth, you can perform manual spot checks or secondary organization after batch deletion.
Operation Steps: Using the Text Tool to Batch Delete TXT Keywords
Step One: Enter the Text Tool and Select the Find and Replace Function
After opening HeSoft Doc Batch Tool , select "Text Tool" from the function category on the left. On the text tool page, you can see multiple processing functions related to TXT text, including "Find and replace keywords in text", "Find and replace complete rows in text files based on keywords", "Delete blanks in text", "Convert text to Word", "Convert text to PDF", etc.
The goal this time is to delete certain keywords in the text, not to delete entire rows or convert formats, so you should choose "1. Find and replace keywords in text". The red box and arrows in the screenshot also point to this function. The core logic of this function is: find specified keywords in the text file content and replace them with new content; when the replacement content is empty, it is equivalent to deleting the keyword.

Step Two: Import the TXT Text Files Needs Processing
After entering the "Find and replace keywords in text" function, the current task name is displayed at the top of the interface, and the process bar shows Step 1 as "Select records to process". On this page, you can import single or multiple text files via "Add Files", or you can import files from a specific folder at once using "Import Files from Folder". For scenarios requiring batch deletion of keywords in many TXT files, it is usually recommended to use "Import Files from Folder", as this can reduce the time spent selecting files one by one.
After importing, files are displayed in a table format, containing information such as sequence number, name, path, extension, creation time, modification time, and operations. In the screenshot, you can see multiple files with the TXT extension appearing in the list, indicating they have been successfully added to the processing queue. If you find a file was imported by mistake, you can remove it via the delete icon on the right side of each row; to reselect files, you can also use "Clear" on the interface. After confirming the list is correct, click "Next" at the bottom to enter the processing options settings.

Step Three: Set Find Method and Keywords to Delete
In Step 2 "Set processing options", you first need to select the find method. The screenshot shows "Exact text find" is selected, which is suitable for deleting clear, fixed keywords, such as complete strings like "Product A" or "Michael Anderson". If your keyword phrasing is very certain, it is recommended to use exact find first, as the processing results are more controllable. The interface also provides a "Use formula for fuzzy text find" option, but if you are only deleting fixed project names or person names, using complex find methods is generally unnecessary.
Next, enter the content to be deleted line by line in the "Keywords to find list". In the screenshot example, two lines are entered: the first line is Product A, the second line is Michael Anderson. This line-by-line input is very suitable for batch cleaning multiple keywords: each line represents a text to be found. On the right is the "Keywords to replace with list", and the interface prompts "Leaving blank means deleting". Therefore, if the goal is to delete keywords rather than replace them with other words, keep the corresponding content on the right side empty.

This step is the core of the entire batch deletion operation. You can think of it as a correspondence table: the left side specifies what to find, and the right side specifies what to replace it with. When nothing is filled in on the right side, the software will delete the text found on the left during processing. For scenarios requiring the deletion of multiple keywords simultaneously, you don't need to repeat the task multiple times; just enter multiple items to be deleted line by line in the left keywords list.
Step Four: Set Additional Options as Needed
On the "Additional options" area of the same page, you can see options like "Ignore letter case" and "Match complete word instead of part of a word". Whether to check these needs to be decided based on the text content. For example, if the English keyword has different spellings like Product A, product a, PRODUCT A, you can consider using ignore case; if the keyword might be part of a longer word, you need to be cautious about choosing whether to match the complete word.
In the example, the content to be deleted is specific phrases and names, so exact text find can be used. After setting this, click "Next" to continue following the interface flow to set the save location and proceed to "Start Processing". Although the screenshot does not show the subsequent pages, you can see from the process bar that the software proceeds by "Select records—Set processing options—Set save location—Start processing". It is recommended to choose a suitable output location before formal processing to avoid being unable to backtrack after overwriting the original files.
Common Questions and Notes
1. Why should the replace-with keyword list be left empty?
Because the goal this time is to "delete keywords", not to change them into another word. The interface already prompts "Leaving blank means deleting", so keeping the right-side replacement list empty means replacing the content found on the left with empty content. After this processing, the original keywords will disappear from the TXT text.
2. Can multiple keywords be deleted at once?
Yes. As seen in the screenshot, the "Keywords to find list" supports multi-line input. Fill in one keyword to delete per line, such as project names, responsible person names, company names, fixed codes, etc. During batch processing, the software will perform the processing on the imported multiple text files according to the settings, thus reducing repetitive searching and manual deletion.
3. What to do if spaces remain in the text after deletion?
After keywords are deleted, spaces or punctuation may remain around the original position. For example, after deleting "Product A" from "Product A development", the surrounding space relationship might need adjustment based on the sentence. If high typography quality is required, it is recommended to spot-check a few files after processing; if further cleaning of extra whitespace is needed, you can combine it with text organization functions later, but operations should be cautious based on actual results.
4. Is it necessary to back up the original files before operation?
Backing up is recommended. The advantage of batch processing is that it affects multiple files at once, so it is best to keep a copy of the original files before formal execution, or choose a new output directory when setting the save location. This way, even if there is a keyword input error or the case setting doesn't meet expectations, you can readjust the rules and process again.
Summary: Replace Opening and Deleting Individually with Batch Processing
Batch deleting keywords in many text files is essentially a typical office automation requirement: fixed rules, a large number of files, and repetitive manual operations. Using the "Find and replace keywords in text" function of HeSoft Doc Batch Tool , you can first batch import TXT files, then enter the content to be deleted in the keyword list, and keep the replace-with keywords empty, thus completing batch deletion.
If you are dealing with a large number of TXT texts, Notepad files, log texts, or exported documentation, you no longer need to open, search, delete, and save them one by one. Follow the steps in this article to prepare the target folder and keyword list first, then use the batch processing tool to execute, which can significantly reduce repetitive labor and the risk of missed deletions, improving text cleaning efficiency.