File Statistics
Moderators: fgagnon, nikos, Site Mods
File Statistics
from another whiny user
How hard would it be to,
in some future version of x2,
generate statistics (chars, words, lines) for all selected text files.
editor2 does this currently for single files.
How hard would it be to,
in some future version of x2,
generate statistics (chars, words, lines) for all selected text files.
editor2 does this currently for single files.
You should try the cygwin implementation for win32 (http://www.cygwin.com)nikos wrote:what you need is a command line app like wc that you can call from x2 on the selection. I don't know whether there's one for windows but a google will tell it like it is!
It provides all command line tools from the Unix environment for use in a Windows environment. A must have for real scripting!! (and of course includes the wordcount app wc )
Dumb questions are the ones that are never asked
I currently use the cygwin (open source unix tools for windows) 'wc':
At shell:
> find . -name "*.java" | xargs wc -l
The above command finds all java files in the current directory tree, but it has trouble if any of the directory names contain a space.
Therefore, I tried creating a user command like this:
$ c:\cygwin\bin\wc $A
But this fails when there are too many files selected (100+ in a scrap frame, which is not a really large project).
At shell:
> find . -name "*.java" | xargs wc -l
The above command finds all java files in the current directory tree, but it has trouble if any of the directory names contain a space.
Therefore, I tried creating a user command like this:
$ c:\cygwin\bin\wc $A
But this fails when there are too many files selected (100+ in a scrap frame, which is not a really large project).
Re: File Statistics
Greetings--pmike wrote:from another whiny user
How hard would it be to,
in some future version of x2,
generate statistics (chars, words, lines) for all selected text files.
editor2 does this currently for single files.
You might want to have a look at this program:
"Translator's Abacus is a FREE word count program developed by GlobalRendering. Just drag and drop files to be counted to Translator's Abacus and a Word Count Report will be presented. "
http://www.globalrendering.com/download.html
You will also find free DOS word count utilities at
http://www.xs4all.nl/~ferguson/dosfilt.html
pmike wrote:$ c:\cygwin\bin\wc $A
But this fails when there are too many files selected (100+ in a scrap frame, which is not a really large project).
Hmmm, this is a problem indeed, but no easy way to get around it. What Nikos suggests may help a little, but somewhere there's the limit. It's even worse when you use scrap containers, because then you have to use $a (or $A), because the program won't be ablt to find the files when using $s (or $S for long filenames).nikos wrote:you must have reached some sort of command line length limit for this tool. But if instead of $A you use $a (the 8.3 equivalent) you'll be able to push more names in for the same limit
You can use $S when in a normal pane. This uses only the filename, without the path. This will allow for a lot more files to be handles this way.
Dumb questions are the ones that are never asked
Re: File Statistics
Greetings--
With the shareware TextPad editor (http://www.textpad.com), you can do searches through files if you build a file containing a list of these file names, one per line.
The search can be done with Unix Regular Expressions. You can search for about anything.
With the shareware TextPad editor (http://www.textpad.com), you can do searches through files if you build a file containing a list of these file names, one per line.
The search can be done with Unix Regular Expressions. You can search for about anything.
Re: File Statistics
Greetings--
You might want to have a look at "Harddisk Search & Stats". It is a freeware utility. Here is a description:
"You can specify as many search terms you want, and there is no limit to the number of file types you can add for searching."
http://www.freebyte.com/harddisk_search_and_stats
You might want to have a look at "Harddisk Search & Stats". It is a freeware utility. Here is a description:
"You can specify as many search terms you want, and there is no limit to the number of file types you can add for searching."
http://www.freebyte.com/harddisk_search_and_stats