|User: Jon -- 2009-03-18 << 320 322 >>|
|Type: Replace text in multiple files|
|Search all Replace text in multiple files examples|
|I have to search through several hundred files for the presence of numbers from |
a list. I need a report which tells me the number and which file it was found
in (as CSV). Note the numbers will sometimes appear with dashes in them in the
target files, I need the numbers to be recognized with or without dashes.
|Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.|
|1. Import the number |
1) ctrl-o open the file containing number list
2) ctrl-h open 'replace' dialog
* fill in 'search for pattern':
click 'advance' page:
* set 'run following at the beginning of replace' to:
* set 'run following for each matched unit' to:
3) click 'Replace'.
2. Search files
1) ctrl-h open 'replace' dialog
* set 'search for pattern' to:
* set 'Replace with pattern' to:
click 'Advanced' page
* set 'Run following for each matched unit' to:
* Reselect the '>' to '>> Append' between 'in page' and 'out page'
2) Click 'Batch...':
* Click 'Pick Files' to pick multiple files
* Check 'Set output filename', and select 01) file -> none
* Click 'Batch Replace'
3. Open result page, select 'Replace->Replace by Template->sort function->Sort and remove duplicate lines'..., done.
*script is for step 2
|Download Script: scripts/321.rst.zip|
Screenshot 1: Replace_Window
Screenshot 2: Replace_Advanced_Window