Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1297.Replace text in multiple files -- How to duplicate a line and change midi to mp3 in many files?

User: Rod Smith -- 2015-04-15          << 1296  1298 >>
Hits: 1102
Type: Replace text in multiple files   
Search all Replace text in multiple files examples
Description:
Many thanks for your good work. I need to:
Duplicate a line in many html files but with modifications.
Many web pages with midi files to download need an additional URL to download an mp3 version of the file. The filenames are the same for the midi and mp3 and need to be retained but other text the folder name, file extension and url label need to be changed as shown.
Input Sample:
line 1
line 2 to nn
<div class="dl"><a href="midis/filename.mid"> Download midi file</a></div>
more lines...
Output Sample:
line 1
line 2
line to nn
<div class="dl"><a href="midis/filename.mid"> Download midi file</a></div>
<div class="dl"><a href="mp3/filename.mp3"> Download mp3 file</a></div>
more lines...
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 html files from windows file browser to "batch runner" window
3. click "Fast Replace" button.
4. click "add" to add new rule
* set 'search' to:

* set 'replace' to:

click "ok"
5. click "start", done

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to duplicate each line 5 times in a text file? (64%)
How to delete lines 1-9, 21, 24 from many files? (62%)
How to remove duplicate lines from a text file? (59%)
How to delete duplicate lines of a text file? (59%)
How to create a text file by choosing N random lines from each of many files? (58%)
How to duplicate every letter of a-z and A-Z in a text file? (58%)
How to delete the first 1-10 lines in many files?  (57%)
How to add specified text to the begin and end of many text files? (57%)

Check Demo of Replace text in multiple files
Keywords:
class  good  addition  div  mp3  file extension  extension  web pages  url  pages  replace text in multiple windows filenames  replace text from mp3  mp3 name text  replace text in multiple files with filenames  text name mp3  batch search for web pages  search for files mp3 batch  batch download files from url