Macro copy a particular line from a file(s) and paste in one specific file.
-
``
I have to copy a particular line from a file(s) and paste in one specific file.
How to achieve in macro in notepad++``
-
@vijay-S
So right away there are problems…
a particular line
Is this line 1235? Is this the line the caret is on? Or…?
one specific file
Presume you mean a file you have open in a tab in N++.
So macros in general aren’t all that “tab aware”…
I mean, well, maybe if this file you are talking about is always the FIRST tab, or the LAST tab, or…well, I don’t even really know…But, I wouldn’t put too much faith in being able to do what you seem to want with a macro. Maybe someone else will comment and prove me wrong.
The reason I don’t really know is that I would quickly turn to a scripted solution for something like this.
Plus it sounds like something that script code could do even outside of N++.
But without more detail in the description, or even better a walk-thru example…hard to say…
-
``
To be more precise,First line is the package defintion of a java file. I want to open list of java files and copy the package definition line and paste in new.txt
`` -
@vijay-S
First line is the package defintion of a java file. I want to open list of java files and copy the package definition line and paste in new.txt
Probably very clear to someone that works with Java often.
Not so clear to someone that doesn’t.
I wish you good luck in your endeavor at finding a solution. -
``Hi
The requirement It is not very technical related to Java… I Just mentioned like that…
My requirement is,
Always the java file will have package line as belowpackage com.abc.edf.*
I want to copy this line from the list of all the java files and paste above package line only in new.txt file
``