User: Aaron -- 2015-08-09 << 1314 1316 >> |
Hits: 3298 |
Type: Random word generator |
Search all Random word generator examples |
Description: |
I would like to match the line counts of multiple text files to the same line count as a target file. For example, File A has 1000 lines. This is the target line count. Multiple files B, C, D, and E etc. are imported to batch runner. They all have different line counts: 1347, 1894, 2004 etc. I would like to sequentially delete random lines from the source files and output new B,C, D, and E text files all with 1000 lines. Sequential deletion of random lines means that the order of the output l |
Input Sample: |
For example: Original File B: Line 1 Line 2 Line 3 Line 4 Line 5 etc. total of 1347 lines Original File C: Line 1 Line 2 Line 3 Line 4 Line 5 etc. total of 1894 lines |
Output Sample: |
Output File B: Line 2 Line 3 Line 5 etc. until 1000 lines reached Output File C: Line 1 Line 2 Line 4 etc. until 1000 lines reached Script 964 does something similar by entering a value for the number of lines to be extracted but the output file lines are in random order instead of sequential. |
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 to "batch runner" window. 3. set "change output folder" to a newfolder, so that original files will not be overwritten 4. click "Fast Replace" button * click "add" to add new rule * keep "search" to be blank * set "replace" to: * click "ok" 5. click "start", done. Note: for single file, you can also use ctrl-h open 'replace' widnow, and set 'replace with pattern' to what in step4, and click 'replace'. |
Screenshot 1: Fast_Replace_Window |