Batch text file editor?

imaneo

Newbie
Joined
Oct 17, 2016
Messages
36
Reaction score
8
I have a text file with a long list of domain names, one per line.
I need a way to batch edit the domains to add www. in front.

Any suggestions?
 
Notepad++

Backup first...

Open the editor -> press CTRL + H -> Click on Find in Files tab.

In "Find what" enter \n
In "Replace With" enter \nwww.
In "directory" enter the directory you want to work on.
For search mode, select the Extended radio button.

Then click on Replace all (You can test it using Find All).
 
Sublime Text has been my go to for these tasks
 
I have a text file with a long list of domain names, one per line.
I need a way to batch edit the domains to add www. in front.

Any suggestions?

Notepad++

Backup first...

Open the editor -> press CTRL + H -> Click on Find in Files tab.

In "Find what" enter \n
In "Replace With" enter \nwww.
In "directory" enter the directory you want to work on.
For search mode, select the Extended radio button.

Then click on Replace all (You can test it using Find All).

Notepadd++ can bring magic to your above problems.
Just try, believe me it works.
 
There is also a tool in Scrapebox. It has some other interesting options too.
 
Notepad++

Backup first...

Open the editor -> press CTRL + H -> Click on Find in Files tab.

In "Find what" enter \n
In "Replace With" enter \nwww.
In "directory" enter the directory you want to work on.
For search mode, select the Extended radio button.

Then click on Replace all (You can test it using Find All).

agree. Notepad+ is a great program.

you can also use column mode - I think you hold down control + alt then press the down arrow and you can put the cursor all the way down the left hand side of the domains, then when you type in www., it will automatically populate the beginning of every row with the same content, and you’ll get the desired result.

I use column mode all the time it’s so useful. So is the regex friendly search and replace as mentioned above by @Gogol

Edit; it’s shift + alt.

ref - https://www.technipages.com/notepad-column-mode
 
Aside from people in this thread who obviously have never touched notepad++, who uses notepad++ in this day and age? There are better alternatives!
 
Aside from people in this thread who obviously have never touched notepad++, who uses notepad++ in this day and age? There are better alternatives!
Agreed. For normal dev work, I use vs code. It has all the features a modern editor should have. Notepad++ acts more like the replacement for windows notepad, which still sucks. It doesn't hurt to have a lightweight editor installed. :)
 
Back
Top