Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

249.Advanced search and replace -- How to batch insert the filename into the beginning of the file conent?

User: editor -- 2008-08-14          << 248  250 >>
Hits: 621
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to batch insert the filename into the beginning of the file conent?
Input Sample:
A.txt:
line1
line2

B.txt:
line1
line2
Output Sample:
A.txt:
A.txt
line1
line2

B.txt:
B.txt
line1
line2
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-h open "Replace" dialog
* select "Advanced" page
set insert begin text to:

2. click "Batch..." to open Batch Runner dialog
3. click "Pick Files" and select multiple files for processing.
4. click "Batch Replace", each filename will be added to the beginning of each file.

Screenshot 1:  Replace_Advanced_Window


Similar Examples:
How to insert 100 different lines into the beginning of 100 text files? (66%)
How to batch rename files with the first word of file contents? (65%)
How to sort the text file by the date at the beginning of each line? (62%)
How to change multiple files, adding filename at the beginning of each file? (61%)
How to batch rename text files with random line from file contents? (59%)
How to insert a word or phrase to the begining of each line? (59%)
How to batch rename files by replacing semicolon with a single dot? (58%)
How to batch rename files by keeping only the numbers at the end? (57%)

Check Demo of Advanced search and replace
Keywords:
process  insert begin text  insert begin  beginning  insert  pick  begin  advanced page  filename  multiple files  batch insert filename into file  insert text into multiple files  insert filename  insert text multiple files  insert text multiple file  insert beginning  batch file select dialog  insert text begin