This article describes how to use HeSoft Doc Batch Tool , the express number in multiple Word files is automatically extracted, and batch renamed to the corresponding number file name. It is suitable for scenes such as logistics face sheets, delivery records, waybill data, customer receipts, etc., especially for documents with unrecognized contents such as the original file names 01.docx and 02.docx. By adding files, setting regular expressions to match express order numbers, and selecting to overwrite the entire file name, you can quickly complete batch renaming of docx and doc files, reducing the repeated operations of manually opening copy order numbers one by one and renaming them.
In logistics, warehousing, after-sales and administrative filing work, we often encounter a batch of Word express bills, waybills or shipping materials, and the file names are only "01.docx, 02.docx, 03.docx" such numbers. The express number that really needs to be used for finding and filing is in the contents of the Word file. If you open documents one by one, copy the express order number, and rename it manually, it is not only time-consuming, but also easy to copy errors or miss files.
This article will introduce how to use office software HeSoft Doc Batch Tool , batch extract express order numbers from Word file contents, and automatically rename Word files such as docx and doc to corresponding express order numbers to help you reduce duplication of work and improve file sorting efficiency.
Applicable Scenarios
"Rename Word Files with Express Number in Bulk" is suitable for the following office scenarios:
- A large number of Word express orders, waybills, and delivery orders need to be filed by express order number.
- The file name is 01.docx, 02.docx, 03.docx and other temporary numbers, and the content cannot be directly determined.
- Each Word document contains a fixed format Tracking Number, express number or waybill number.
- Docx and doc documents need to be processed in batches to avoid manually opening and renaming files one by one.
- Logistics, warehousing, e-commerce, customer service, financial reconciliation and other positions need to quickly retrieve documents by single number.
As can be seen from the screenshot example, the original file names are 01.docx to 05.docx, and the Word document content contains similar 2167646565 the express order number. After processing, the file name becomes 2167646565.docx, 4771177418.docx wait for the form of single number.
Effect Preview: Pre and Post Processing
before processing: Word file name is just a normal number
before processing, the Word file name in the folder is:
- 01.docx
- 02.docx
- 03.docx
- 04.docx
- 05.docx
these names do not reflect the contents of the file. If you want to query a waybill by express waybill number later, you need to open the documents one by one to view, which is very inefficient.

Word content contains the express number
open one of the Word files to see that the document is Courier Waybill type of express single content, where the field Tracking Number the following corresponding value is 2167646565. This is exactly what we want to extract as a file name.

After processing: the file name is changed to the express order number.
After batch processing is complete, the file name becomes:
- 2167646565.docx
- 4771177418.docx
- 5095496782.docx
- 9213049048.docx
- 9249110608.docx
in this way, the file name itself can directly correspond to the express order number, and subsequent search, filing and checking are more convenient.

Operating Steps: Rename Word Files with Express Number in Batch
step 1: Enter the "Rename Word File with File Contents" function
open HeSoft Doc Batch Tool , select in the left function category file Name. Locate and click in the feature list rename a Word file with file contents.

The function of this function is to read the contents of Word files in batches and use the specified text in the contents as the new file name. For fixed format information such as express order number, contract number, order number, customer number, etc., you can batch extract and rename it in this way.
Step 2: Add Word files that need to be processed
after entering the function page, the page title is displayed rename a Word file with file contents. In the first step "select the records to be processed", you can click at the top right of the page. Add File button to add the docx file that needs to be renamed.
If the files are concentrated in the same folder, you can also use import files from a folder. Five Word files have been added to the screenshot. The table shows the file name, path, extension, creation time, and modification time.

After the addition is completed, it is recommended to confirm whether the file list is correct to avoid adding documents that do not need to be processed together. After confirming that it is correct, click at the bottom next step.
Step 3: Set to extract the express number from the Word content
after entering the second step "Set processing options", you need to specify which area in the Word document the software looks for the new file name.

In the screenshot example, select customize the text that the formula matches, and in regular Expressions fill in the input box:
\d{10}
the meaning of this expression is: match 10 consecutive digits. Because the express bill number in the example is a 10-digit number, such as 2167646565, you can use this expression to automatically find the corresponding bill number from the Word content.
If your express number is not 10 digits, you need to adjust the expression according to the actual number rules. For example, some odd numbers may have longer digits or contain letters. Do not apply the sample expression directly at this time, but set it according to the actual format.
Step 4: Select the location of the new file name
in the "Location" area, select overwrite entire file name. This means that the original file name body will be replaced with the extracted express number after processing.
For example:
- before processing: 01.docx
- extracted express number: 2167646565
- after processing: 2167646565.docx
if your goal is to have the file name exactly equal to the waybill number, it is recommended to choose "Overwrite entire file name". In this way, the file name is more concise and more suitable for filing and retrieval by single number.
Step 5: Continue to the next step and start batch processing
after setting up the matching rules and file name location, click at the bottom next step. The interface process will also enter the "set save location" and "start processing" steps.
Before formal processing, it is recommended to confirm the save location and the list of processed files to avoid misoperation. After confirming that it is correct, the software will automatically read the contents of each Word file, match the express order number, and rename the file in batches.
After the processing is completed, return to the folder to see that the original 01.docx, 02.docx and other files have become the corresponding express order number file name.
Frequently Asked Questions and Precautions
1. What if the number of express orders is not 10?
The example in the screenshot uses \d{10} for consecutive 10-digit odd numbers. If your express number is different, you need to modify the regular expression. It is recommended to observe the common rules of single numbers in Word content before setting matching rules.
2. There are multiple consecutive numbers in the Word file, will they match wrong?
If the document contains numbers such as telephone number, date, zip code, etc. in addition to the express number, simply using digit matching may match other content. At this time, the regular expression should be made to fit the format of the express number as much as possible to reduce mismatches.
3. Do I need to back up files before processing?
Batch renaming is an operation that modifies file names in bulk. In order to prevent the file name from being inconsistent with expectations due to incorrect rule settings, it is recommended to keep a backup of the original file before formal processing, or test the rule with a small number of files first.
4. What about duplicate file names?
If the courier number extracted from two Word files is exactly the same, it may cause a file name conflict. Before processing, you should try to confirm that the express order number in each document is unique, especially when processing a large number of waybills in batches.
5. can doc and docx handle it?
The feature name is "Rename Word file with file contents" and is suitable for Word document scenarios. For actual processing, the supported files in the software import list shall prevail. In the screenshot example, the docx file is processed. If you have a doc file, you can confirm whether it can be imported normally when adding the file.
Summary
by HeSoft Doc Batch Tool The "Rename Word File with File Content" function of can automatically extract the express order number in Word document and replace the original file name in batch. For a large number of Word document sorting work such as logistics documents, waybills, shipping records, and receipts, this method is more efficient and less error-prone than manually opening copy numbers one by one.
If you have a batch of Word express orders named 01.docx and 02.docx in your hand, it is recommended to prepare a small number of documents to test the matching rules, and then process all the documents in batch after confirming that the order number can be correctly extracted. In this way, docx and doc documents can be quickly archived, making file retrieval and subsequent management clearer.