Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sure there is a way to do this but I can not seem to figure it out. I will try my best to explain this.

I have a list with 20,000 lines in notepad++. I have two tabs open in notepad++. The right side tab is the main list. The left side tab is what needs to be added to the beginning of each line in the right tab.

Here is an image of my notepad++ to give you a better understanding.

enter image description here

I need to be able to do the following in an automated way as I have over 20,000 lines to do this way.

  1. copy line 1 of tab 'new 7'
  2. switch to tab 'new 6'
  3. paste clipboard(line 1 of tab 'new 7') at beginning of line 1 tab 'new 6'
  4. switch back to tab 'new 7'
  5. copy line 2 of tab 'new 7'
  6. switch to tab 'new 6'
  7. paste clipboard(line 2 of tab 'new 7') at beginning of line 2 tab 'new 6'

I have both pasteitin and typeitin download but if i need some other program/app or if it's built in to notepad++ that would be great. I need to do this by the program itself or for me to only have to press a button to do each of these.

share|improve this question
Why do this with the IDE? It's a pretty basic thing to do this with any kind of programming language: Read 2 files by line to 2 arrays (or other container) then print the concatenation of the 2 arrays elements into a line to a third file. – totymedli Jun 29 '13 at 15:30
Though I fully understand what you are saying I'm not sure where I would start to do that or even if i have enough understanding of any language to be able to. Suggestion? – user2526699 Jun 29 '13 at 15:39
What's wrong with vertical selection and copy and paste? You can even use the same selection afterwards to remove the excess whitespace if there is any before the quotation mark. – Breakthrough Jun 29 '13 at 18:17
up vote 1 down vote accepted

I don't think that you can do this in the IDE. However the task is very easy in any kind of programming language, for example in PHP:

  1. Download and install XAMPP.
  2. Search the htdocs folder in the XAMPP folder. Probably C:/xampp/htdocs or C:/Program Files/xampp/htdocs.
  3. Create a new folder named anything for example foldername and put your two input files (in .txt format) to there named input1.txt and input2.txt.
  4. Create a file called index.php and copy the code below.
  5. Open your browser and enter: http://localhost/foldername.

This code will concatenate the lines in input2.txt after the lines in input1.txt:

$lines1 = file('input1.txt', FILE_IGNORE_NEW_LINES);  
$lines2 = file('input2.txt', FILE_IGNORE_NEW_LINES);  
for ($i = 0,$size=count($lines1); $i < $size; $i++)  
echo $lines1[$i].$lines2[$i].'<br>';  
share|improve this answer
I have xammp set up already. Trying this now. – user2526699 Jun 29 '13 at 16:09
And it worked! Thank you so very much. You've just saved me more work than i can explain. I may even use this as a method for a CMS on my website. Thanks again! – user2526699 Jun 29 '13 at 16:19
How do I accept it? Sorry. New-ish to these types of sites. – user2526699 Jun 29 '13 at 16:33
Click the tick under the big number in the left. Also read about and help if you are new here. – totymedli Jun 29 '13 at 16:34
Nvm found it. =) accepted. ty. – user2526699 Jun 29 '13 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .