How can I replace first line of every file in Notepad++? -


i have 30 text files.

then have 1 text file 30 lines. let's call 30lines.txt

i want replace first line of each of 30 text files corresponding line 30lines.txt

how do this?

it's easy in synwrite app. have python console: enter there n commands. e.g. commands read contents of "30lines.txt" is:

from sw import * file_open(r'c:\dir\30lines.txt') text = ed.get_text_all() text = text.split('\r\n') print('lines: '+str(len(text))) 

to replace 1st line "haha":

from sw import * file_open(r'c:\new.txt') ed.set_text_line(0, 'haha') 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -