<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[1000 files, increment each first line number by 1]]></title><description><![CDATA[<p dir="auto">I have 1000 txt files (000-999) and I would like to increment the first (and only) line by one.  I already have the first line of text on each file, Is there a way to do a search and replace across multiple files so that each file’s first line  increases by one.</p>
<p dir="auto">All files have the first line: <em>first_line_of_text_</em></p>
<p dir="auto">and would like to make the first line of each file:</p>
<p dir="auto">(the first file) <em>first_line_of_text_<strong>000</strong></em><br />
(second file) <em>first_line_of_text_<strong>001</strong></em><br />
etc</p>
<p dir="auto">Is there a way to do a search &amp; replace so that each file’s first line is increased by 1?</p>
<p dir="auto">Many thanks</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20611/1000-files-increment-each-first-line-number-by-1</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 04:10:28 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20611.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Jan 2021 09:53:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 16:08:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a> I have been able to achieve my objext using notepad++ although it is quite inelegant.</p>
<p dir="auto">I have a folder with 1000 text files, which I duplicated. I then renamed them with a suffix 000.txt -&gt; 999.txt</p>
<p dir="auto">Each file has a unique first line, with a name and number, and all I did was do a search and replace to add in an extra zero and change the _001 to _0001</p>
<p dir="auto">It will give me a unique first line, but will be a little more messy when combine with the other folder – but will work for what I am after.</p>
<p dir="auto">Thanks for your help!! Most appreciates.</p>
<p dir="auto">Daja</p>
<p dir="auto">PS I know I’ve done it before, and it’s driving me nuts that I don’t remember how or where I found it…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61980</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61980</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 16:08:47 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 15:41:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a> If you have an idea that might help, I would be thankful&gt;<br />
For renaming a number of files I use a very useful utility called BulkRename Utility.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61979</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61979</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 15:41:13 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 15:33:40 GMT]]></title><description><![CDATA[<p dir="auto">@dajaridi my files do that but for file names, I’ll do my best to help you</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61978</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61978</guid><dc:creator><![CDATA[Javier Rivas]]></dc:creator><pubDate>Mon, 18 Jan 2021 15:33:40 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:44:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a> Yes!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61977</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61977</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:44:49 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:43:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a></p>
<p dir="auto">All files have the first line: <strong>first_line_of_text_</strong></p>
<p dir="auto">and would like to make the first line of each file:</p>
<p dir="auto">the_first_file.txt<br />
first_line_of_text_<strong>000</strong></p>
<p dir="auto">the_second_file.txt<br />
first_line_of_text_<strong>001</strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/61976</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61976</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:43:48 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:42:21 GMT]]></title><description><![CDATA[<p dir="auto">@dajaridi ok, ok I think I got only the first line, only the first line of context on each txt file</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61975</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61975</guid><dc:creator><![CDATA[Javier Rivas]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:42:21 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:41:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> Yes, adding a number starting with 000, last being 999 to the first line of text. Thanks for contributing</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61974</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61974</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:41:22 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:40:23 GMT]]></title><description><![CDATA[<p dir="auto">@dajaridi the context of a file, like you are editing a txt files and inside you have<br />
Example<br />
I am<br />
John<br />
Smith</p>
<p dir="auto">And in front of that you want a counter<br />
001 I am<br />
002 John<br />
003 Smith</p>
<p dir="auto">Like it’s counting rows, if please give an example</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61973</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61973</guid><dc:creator><![CDATA[Javier Rivas]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:40:23 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:36:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a></p>
<p dir="auto">You can add the source of the batch file by adding <code>~~~</code>.<br />
before and after the source, but you can’t attach files to the post.<br />
For example</p>
<pre><code>@echo off
set X=%%1
...
</code></pre>
<p dir="auto">But I think OP is asking about manipulating the file contents<br />
instead of the individual file names.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61972</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61972</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:36:52 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:36:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a> No, not the text file name itself, but the first line of text in each file.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61971</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61971</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:36:24 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:36:11 GMT]]></title><description><![CDATA[<p dir="auto">@dajaridi to make sure I understand this, you have 100 .txt files and you would like to rename all the txt files by adding a counter in front of the name right, 001 filename.txt, 002 filename.txt and so on</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61970</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61970</guid><dc:creator><![CDATA[Javier Rivas]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:36:11 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:33:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/14479">@Ekopalypse</a> I’m new here, can we share batch file here, if it helps to rename file names? I believe that is what he is asking to rename a .txt filename by adding 000 in front on his filename and counting. I would of never thought that notepad++ can rename a txt filename</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61969</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61969</guid><dc:creator><![CDATA[Javier Rivas]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:32:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/20928">@Javier-Rivas</a> Yes please, that would be great! Thank you. I had done it once before and I was sure it was with notepad++ but maybe it was a bat.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61968</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61968</guid><dc:creator><![CDATA[nextstep]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:32:51 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 14:28:40 GMT]]></title><description><![CDATA[<p dir="auto">@dajaridi I might have something that you can use, but not with notepad ++, But with a bat file, if your interested</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61967</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61967</guid><dc:creator><![CDATA[Javier Rivas]]></dc:creator><pubDate>Mon, 18 Jan 2021 14:28:40 GMT</pubDate></item><item><title><![CDATA[Reply to 1000 files, increment each first line number by 1 on Mon, 18 Jan 2021 13:08:49 GMT]]></title><description><![CDATA[<p dir="auto">@dajaridi</p>
<p dir="auto">Natively by npp, jein(yes/no).<br />
Of course you can come up with a regex that appends 000 in the first file, 001 in the second … , but that would be an insanely long one, I guess.<br />
I assume that learning some basics in a scripting/programming language wouldn’t take much longer and would give you a lot more options afterwards.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/61966</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/61966</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 18 Jan 2021 13:08:49 GMT</pubDate></item></channel></rss>