Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

492.Count and statistics -- How to count the number of lines and characters in multiple files and make a list?

User: editor -- 2010-04-29          << 491  493 >>
Hits: 2692
Type: Count and statistics   
Search all Count and statistics examples
Description:
How to count the number of lines and characters in multiple files and make a list? 
I have many text files that contains some data, can I count how many lines, how many characters in each file, and make a list for it?
Input Sample:
01.txt 
02.txt 
03.txt 
..
Output Sample:
result.txt contains following contents: 
File: 01.txt Lines: 3 Chars: 13 
File: 02.txt Lines: 3 Chars: 12 
File: 03.txt Lines: 9 Chars: 33 
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open 'Tools->Batch Runner' window 
2. drag all text files from windows file browser to 'Batch Runner' window 
3. check option of 'set output filename', and modify the following entry to: 
 
4. click 'Fast Replace' button,open 'Fast Replace' window 
* click 'Add' button, in 'Search' entry, enter: 
 
* in 'Replace' entry, enter: 
 
* click 'ok' 
* make sure 'Regular Exp' option is checked 
* change the write_mode from '> Overwrite' to '>> Append' 
* click 'Start', the result will be attached to result.txt

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to remove a string of characters from multiple filenames? (66%)
How to extract all lines with more than 30 characters from multiple files? (65%)
How to remove first number in each line for multiple files? (61%)
How to extract first 55 characters form multiple .txt.files? (58%)
How to replace strings and numbers with new format in multiple files? (58%)
How to extract all lines that contain "abc" from multiple files? (58%)
How to extract first line from multiple files and generate a new file? (58%)
How to count the number of words for many files and append result to each file? (58%)

Check Demo of Count and statistics
Keywords:
overwrite  mode  count how many  write  files that contain  make a list  append  contains  statistics  statist  count number of characters in multiple  how to count the number of lines in each file in windows  modify text multiple files  count how many characters in a text file  count how many characters in a text  count how many characters in text  how to count how many characters in text file  count how many characters