When the same brand name, person's name, project code, or sensitive term repeatedly appears across multiple TXT text files, opening each file individually to find and delete them is not only time-consuming but also prone to omissions. Using HeSoft Doc Batch Tool as an example, this article demonstrates how to use the search and replace function in a text tool to batch-replace specified keywords in multiple text files with empty strings, thereby achieving the effect of batch-deleting keywords. This is suitable for office tasks such as data cleanup, text anonymization, and unified manuscript revision.
In daily office work, many teams accumulate a large number of TXT and Notepad format text files, such as project records, product descriptions, meeting minutes, customer service scripts, test data, log summaries, etc. As the need for material reuse and external sharing grows, we often need to uniformly delete certain fixed words from these text files, such as old product names, customer names, responsible person names, internal project codes, sensitive fields, and so on.
If there are only one or two files, you can manually open Notepad and use Ctrl+H to replace them. However, when the number of files reaches dozens or hundreds, opening, finding, deleting, and saving each one individually is very inefficient and makes it easy to miss deleting a keyword in some file. This article aims to solve this problem: using the office software ' HeSoft Doc Batch Tool ', batch delete specified keywords from multiple TXT text files by finding and replacing text content.
From an operational logic perspective, deleting a keyword is not a separate mysterious feature. Instead, you set the keyword you want to delete as the search content, and leave the replacement content blank. When the software processes files in batches, it replaces the matched text with nothing, thus achieving the goal of batch deleting keywords.
Applicable Scenarios: Which situations are suitable for batch deleting keywords in text files
The need to batch delete text keywords is very common, especially in scenarios with a lot of repetitive text and a large number of files. The following situations can all be handled using similar methods:
- Batch delete brand names or product names: For example, Product A, old system names, or old campaign names repeatedly appear in multiple TXT files and need to be cleaned up uniformly.
- Batch delete names, customer names, or submitter information: For example, the name Michael Anderson in the sample appears in the body text and signature line and needs to be removed before publishing.
- Batch clean up sensitive words or internal codes: Such as project codes, internal department abbreviations, temporary version names, etc., which are not suitable to be kept in external-facing materials.
- Pre-processing before batch revision: Before editing a large volume of text, delete unnecessary fixed words first to reduce subsequent manual checking time.
- Text anonymization and data cleansing: Uniformly clean up TXT files, log text, and exported record files to ensure a more standardized content format.
The examples in this article focus on TXT text files. If you are dealing with Word documents, such as .doc or .docx files, you typically need to use Word-related tools in the software or convert them to a suitable format first. The operational focus explained in this article is the batch finding and replacing of text file content within the text tools.
Effect Preview: What changes before and after processing
First, look at the text content before processing. The screenshot shows an open text file named Product A.txt, where Product A appears multiple times, and Michael Anderson also appears. The positions marked by red boxes indicate these are all keywords that need to be batch deleted. You can see that these words may appear at the beginning of a paragraph, in the middle of a sentence, or even in a signature position. If deleted manually one by one, it's not only time-consuming but also easy to miss some.

After processing is complete, when you open the same text file again, you can see that Product A and Michael Anderson have been deleted. The spots where the keywords originally were become blank, while the rest of the body text remains. This shows that the goal of this processing is not to delete entire lines or files, but to precisely delete specified keywords from the text.

It's important to note that after a keyword is deleted, consecutive spaces or changes in sentence flow might be left in the original position. For example, after Product A is deleted from the middle of a sentence, extra white space might appear between the words before and after it; after the person's name is deleted from a signature line, the field after "Submitter:" becomes empty. This is a normal result of batch replacement with nothing. If higher formatting standards are required, you can follow up by deleting blank spaces or arranging the text for further cleanup after the keyword deletion.
Operation Steps: Using HeSoft Doc Batch Tool to batch delete TXT keywords
The following demonstrates the complete workflow from entering the function to setting keywords, following the order of the screenshots. The core idea of the entire process is: select the text tool, enter the Find and Replace Keywords in Text function, import the TXT files to be processed, enter the keywords to be found, and leave the replacement content blank.
Step 1: Enter the text tool and select Find and Replace Keywords in Text
After opening HeSoft Doc Batch Tool , select 'Text Tools' from the function categories on the left. The right side will display batch processing functions related to text files, such as Find and Replace Keywords in Text, Process entire lines based on keywords, Delete blank spaces in text, Convert Text to Word, Convert Text to PDF, etc.
The current requirement is to delete specified keywords from many text files, so 'Find and Replace Keywords in Text' should be selected. This function's purpose is to batch find specified words in text file content and replace them with new content. When the replacement content is empty, it's equivalent to batch deleting these keywords.

After selecting this function, the software enters a wizard-style processing interface. The advantage of the wizard process is that each step is relatively clear, suitable for reducing operational errors when processing a large number of files.
Step 2: Add the TXT text files to be processed
After entering the function page, the first step is 'Select records to process'. As seen in the screenshot, the top right corner of the page provides two entry points: 'Add Files' and 'Import Files from Folder'.
If you only need to process a small number of specific files, you can click 'Add Files' and manually select the TXT files to be processed; if a folder has a large number of text files, you can use 'Import Files from Folder' to add all relevant files within the folder to the processing list at once. For batch keyword deletion scenarios, importing from a folder is usually recommended, as this reduces the time spent on repeated file selection.

After the files are imported, the list will display the sequence number, name, path, extension, creation time, modification time, and an action column. This information allows you to confirm whether the files were imported correctly. For example, the screenshot shows multiple Product A - Copy files imported, with the extension txt, indicating that the software has recognized the text files to be processed.
Before clicking the next step, it is advisable to check two points: first, confirm that the file paths belong to the folder intended for this processing; second, confirm that there are no text files in the list that shouldn't be processed. If a file doesn't need to be part of the batch deletion, it can be removed from the list via the delete icon in the action column.
Step 3: Set the search method and keywords to be deleted
After clicking 'Next', you enter the 'Set Processing Options' page. The screenshot shows that 'Exact Text Match' is currently selected. This option is suitable for deleting clear, fixed keywords, such as specific product names, person names, numbers, fixed phrases, etc. In the example, the keywords to be deleted are Product A and Michael Anderson, so using Exact Text Match is appropriate.

At the bottom of the page, you can see two list areas: on the left is the 'List of Keywords to Find', and on the right is the 'List of Replacement Keywords'. The goal here is to delete keywords, so the operation method is: enter the keywords to be deleted line by line on the left, and leave the corresponding positions on the right empty. The prompt at the top of the screenshot also states, 'Leaving it blank means deletion,' which is the key setting for batch deleting keywords.
For example, in this case, two lines were entered on the left:
- Product A
- Michael Anderson
The list of replacement keywords on the right is left empty. This way, during processing, the software will find Product A and Michael Anderson in each imported TXT file and replace them with nothing, achieving batch deletion.
On this page, you can also see additional options, such as 'Ignore Case' and 'Match Whole Word Only'. These two options should be chosen carefully based on the actual text situation. If you want different case variations like Product A and product a to also be processed, you can consider ignoring case; if you're worried that a short word is just a part of another word and don't want an incorrect deletion, you can pay attention to the Match Whole Word option. Whether to check them or not should be based on your text content and cleanup goals.
Step 4: Continue to next step, set save location and start processing
After completing the keyword list setup, click the 'Next' button at the bottom of the page. From the wizard bar at the top, you can see the subsequent steps include 'Set Save Location' and 'Start Processing'. The purpose of this step is to determine where the batch processed files should be saved and to finally execute the processing task.
Since batch deleting keywords directly alters file content, it is recommended to make a backup before starting processing, or select an easily distinguishable output directory during the save location step. This way, even if the keyword settings are found to be not entirely accurate, you can go back to the original files and re-process, avoiding the risk of irreversible modifications.
After entering the start processing step, confirm that the file list, search keywords, and replacement content are correct, and then execute the batch processing. After processing is complete, open the output files for spot checks, focusing on whether the keywords have been deleted, whether the body text has been preserved, and whether there are unnecessary extra spaces or formatting issues.
Frequently Asked Questions and Notes
1. Why does leaving the replacement keyword list empty delete content?
The essence of batch replacement is to change the found content into another piece of content. When the replacement content is empty, the original keyword is replaced with nothing, so it appears deleted. The right area in the screenshot explicitly prompts 'Leaving it blank means deletion', so this is a normal supported usage of this function.
2. How should I enter multiple keywords to delete?
It is recommended to put one keyword per line. For example, Product A on one line, Michael Anderson on another line. This makes the correspondence clearer and facilitates later checking. If a keyword contains spaces, enter it completely, including the spaces in between, otherwise it might not match the full content in the original text.
3. Is it necessary to back up files before processing?
Backup is recommended. Batch processing of files is highly efficient, but it also means one setting can affect multiple files. If keywords are entered incorrectly, it can lead to a lot of files being modified incorrectly. Therefore, before processing official materials, you can copy a small batch of files for testing first, and batch process all files only after confirming the effect meets expectations.
4. What to do if extra spaces appear after deletion?
If a keyword was in the middle of a sentence, its deletion might leave a space between the two words, or cause the punctuation flow to look less natural. This is a normal phenomenon after text content changes. You can continue using text cleanup features to deal with whitespace according to actual needs, or uniformly adjust key paragraphs during the manual review stage.
5. How to choose between exact match and fuzzy match?
The example selected Exact Text Match, which is suitable for clear targets like fixed words, fixed names, and fixed product names. Fuzzy match is more suitable for content with less rigid rules, but requires more caution to avoid incorrect matches. For batch keyword deletion, beginners are advised to use Exact Match first.
Summary: Batch deleting keywords can significantly reduce repetitive work
When you need to delete the same keywords from many TXT text files, manually finding and deleting them one by one is not an efficient solution. Using the text tools in HeSoft Doc Batch Tool , you can use the 'Find and Replace Keywords in Text' function to uniformly replace fixed terms like Product A and Michael Anderson in multiple files with nothing, thus quickly completing batch deletion.
The value of this type of office software lies in delegating repetitive, mechanical file processing tasks to the tool, allowing users to spend their time on content confirmation and business judgment. It is recommended that you prepare a file backup first and test the keyword settings with a small number of sample texts before formal processing. Once you've confirmed the results are correct, then import the entire batch of TXT files for processing, enabling you to complete text cleanup tasks more safely and efficiently.