Go Back To Code List
[Notepad++]
Current Code Entry
Next Code Entry
How to add text to the beginning of every line of a text file using Notepad++
Right Arrow
How to add text to the end of every line of a text file using Notepad++
Article Entry Date: March 17,2024 @ 01:53:45 / Last Updated On: March 19,2024 @ 05:07:23
In this article, we will add text to the end of every line in Notepad++. This will make your workflow quicker, allowing you to return to the import tasks.

Bring open the Find/Replace dialog. (Ctrl+F)

To add characters to the end of every line in a file.
Find What: $
Replace with: ]', RESEED, 0\);

Example:
Let's say you have a bunch of SQL Server Tables in your database that need to be RESEEDed.
(This means you want to start the ID Count at 1.)

DBCC CHECKIDENT ('[TableOne]', RESEED, 0);
You have TableOne - TableTwenty
In your list, you have.
TableOne
TableTwo
TableThree
TableFour
TableFive
etc...

Hit [Ctrl+H] to open the [Find/Replace] Dialog.
In the [Find what:] $ (This is the dollar sign)
In the [Replace with:]

(To add a Parentheses to the end, you must add a backslash. As you can see above, we have 0\).
Without the backslash, the Parentheses and Semi-colon (semicolon) would not be added.)
Search Mode: Check [Regular Expression]
Then click on [Replace All]
The output will be this.