Path: news.mathworks.com!newsfeed-00.mathworks.com!oleane.net!oleane!news.ecp.fr!aioe.org!not-for-mail
From: dpb <none@non.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: file length
Date: Wed, 03 Jun 2009 17:15:15 -0500
Organization: Aioe.org NNTP Server
Lines: 34
Message-ID: <h06sra$n6n$1@aioe.org>
References: <h05vlj$csf$1@fred.mathworks.com> <h06437$kts$1@online.de> <h0663p$4te$1@fred.mathworks.com> <h06ctf$er4$1@fred.mathworks.com> <h06d81$850$1@fred.mathworks.com> <h06dme$7ii$1@aioe.org> <h06fkt$nc9$1@fred.mathworks.com>
NNTP-Posting-Host: 1pS0j5RQWFm/dMDzCP9Zzg.user.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
X-Notice: Filtered by postfilter v. 0.7.9
Cancel-Lock: sha1:ml8vegqWoujA+6iz34VLTWXsAuE=
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
Xref: news.mathworks.com comp.soft-sys.matlab:544662


Dominic wrote:
> dpb <none@non.net> wrote in message <h06dme$7ii$1@aioe.org>...
>> Dominic wrote:
>>> "Steven Lord" <slord@mathworks.com> wrote in message
>>> <h06ctf$er4$1@fred.mathworks.com>...
>> ...
>>>> ... use the wc system function.  This will give you, among
>>>> other information, the newline count for the file.  See "man
>>>> wc" for more information.
>> ...
>>> No I'm using Windows
>> There are any number of Windows ports--here's one...
>> 
>> "WordCount is a small freeware Windows 95/98/NT command-line
>> program that counts characters, words and lines in one or more
>> files -- my attempt to bring the features of the Unix "WC" utility
>> to Windows...."
>> 
>> <http://www.tawbaware.com/wc.htm>
>> 
>> (google is your friend)
>> 
>> --
> 
> I am not familiar with that kind of program. Is it possible to call
> it in MATLAB? The way my program runs now I am working through an
> entire folder of .dat files using the dir command and a loop so that
> I run each file. Thank you,

Just pass the command to the OS as Steve suggested...or, likely you 
could simply run the utility directly on the files w/ a wild card and 
pipe its output to a file for later use.

--