How to batch rename the first line content in multiple Notepad and plain text files to the filename


Translation简体中文繁體中文EnglishFrançaisDeutschEspañol日本語한국어Updated on2025-01-14 17:44Editor-in-Chiefsystem

SummaryIn the process of managing text files, there are a large number of text files with extensions such as txt, html, json, csv, srt, etc., that need to have the first line of text as the filename for easier and more intuitive handling of the files and distinguishing their contents. In plain text files, this is often used for segmenting chapters and titles in novels. Below is an introduction on how to batch rename these Notepad and plain text files using the first line of content as the new filename.


1、Usage Scenarios

Use a portion or all of the content from the first line of plain text format files such as txt, html, json as the filename of the file.

For example: Text files in the format of Test.txt, Test.html, Test.json

Where the first line contents are Apple, Banana, Cherry respectively, renamed to Apple.txt, Banana.html, Cherry.json

2、Preview

Before Processing:

After Processing:

3、Operation Steps

Open the 【HeSoft Doc Batch Tool】, and select 【File Name】 - 【Rename Text Files Using First Line】.

【Add Files】 to add a single or multiple Notepad and plain text files that need to be renamed.

【Import Files from Folder】 to import a folder containing a large number of Notepad and plain text files that need to be renamed.

You can also drag files directly into the area below. Then click Next.

【How many characters to take from the beginning?】1 letter counts as 1 character. If you choose the entire content of the first line, it will be empty.

After waiting for the processing to complete, click on the save location to view the renamed text files.


Disclaimer: The text, images, videos, etc., on this website are limited to the software version and operating environment used when creating this content. If subsequent product updates cause your operations to differ from the content on the website, please refer to the actual situation!

More Articles