Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1293.Replace text in multiple files -- How to move the specified line to the end in multiple files?

User: Rod Smith -- 2015-04-06          << 1292  1294 >>
Hits: 2972
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
Many text files, of variable length, contain a comment line beginning <! -- 
 This comment line is at a variable position in the file. I need to move these lines to the end of the file in all the files.
Input Sample:
line 1
line 2
line n 
<!-- comment line
....-- >
line n+2
line n+1
line last
Output Sample:
line 1
line 2
line n
line n+2
line n+1
line last
<!-- comment line
....-- >
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" menu 
2. drag multiple files from "windows file browser" to "batch runner" window 
3. click 'Fast Replace' button to open 'Fast Replace' window 
4. click 'add' to add new rule 
* set 'search' to: 
 
* set 'replace' to: 
 
5. make sure "reg exp" and "cross line" options are checked 
6. click 'start', done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to shuffle specified lines in multiple text files? (76%)
How to move the last line to the beginning for multiple text files? (75%)
How to remove some specified characters from multiple filenames? (72%)
How to add empty line at begin of multiple files? (71%)
How to remove consecutive duplicate words in multiple files? (71%)
How to extract specified lines in multiple excel(csv) files? (71%)
How to remove additional line breaks from multiple files? (71%)
How to read each line of a file and insert into multiple files? (68%)

Check Demo of Replace text in multiple files
Keywords:
variable  position  length  var  specified line  cross line  line begin  beginning  rule  specified  multiple variable  add new line at beginning  add text to beginning of multiple files windows  add text lines beginning  add beginning and end file  move files contain text  add text to end of line multiple files  add text to the end of a multiple file windows