User: Aaron Allan -- 2013-09-04 << 1124 1126 >> |
Hits: 4051 |
Type: Text merge |
Search all Text merge examples |
Description: |
How to create a text file by choosing one random line from a set of files in sequence? For example, choose random line from Text1.txt, followed by random line from Text2.txt, then Text3.txt etc. The number of lines for output can be set. In this example we'll use 12 files and output 12 lines according to the example below. |
Input Sample: |
-CONTENT OF Text1.txt : Text1 -Line1. Text1 -Line2. Text1 -Line3. Text1 -Line4. etc. -CONTENT OF Text2.txt : Text2 -Line1. Text2 -Line2. Text2 -Line3. Text2 -Line4. etc. -CONTENT OF Text3.txt : Text3 -Line1. Text3 -Line2. Text3 -Line3. Text3 -Line4. etc. -CONTENT OF Text12.txt : Text12 -Line1. Text12 -Line2. Text12 -Line3. Text12 -Line4. etc. |
Output Sample: |
Text1 -Line3. Text2 -Line27. Text3 -Line300. Text4 -Line57. Text5 -Line89. Text6 -Line6. Text7 -Line17. Text8 -Line48. Text9 -Line6. Text10-Line29. Text11-Line458 Text12-Line97 |
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 text files from "windows file browser" to "batch runner" window 3. click "Fast Replace" button to open "Fast Replace" dialogue 4. click "add" to add new rules: * keep 'search' to be blank * set 'replace' to: Note: in this case we choose 3 lines, you can change it to other values accordingly. * click "ok" 5. click "start", and click "output to single file" button, then select an output file, done. |
Screenshot 1: Fast_Replace_Window |