Yuk! When I see something like that I know why I like Unix and not NT.

wc *.cfm     (count all lines in all CFM files in this directory)
find . -exec wc *.cfm    (count all lines in all CFM files in the entire tree starting 
where I am)

At 05:11 PM 9/29/00 -0700, Adrian Cesana wrote:
>Lol,
>
>NT Batch is MUCH more powerful than most people realize.  Its funny, some of
>the "newer" people in this business dont even know how to EXIT a CMD window
>but can write a mean CF script...
>
>-Adrian
>
>-----Original Message-----
>From: Jaime Garza [mailto:[EMAIL PROTECTED]]
>
>
>Wow!
>
>bat-man they call you! or is it cmd-man?  I never thought a CMD would do all
>that!  I was thinking perl myself, or scripting host, or a cln in C, but
>never this!
>
><Jaime/>
>
>P.S. Everyone else, keep this one around.  It may be worth some collector
>money in 2010, after DOS finally dies.
>
>---------- Original Message ----------------------------------
>From: "Adrian Cesana" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>Date: Thu, 21 Sep 2000 13:11:05 -0700
>
>>Place this code into a *.CMD file.  Currently it is looking in e:\cfm for
>>*.cfm, you can change this as needed.  Also the output file is
>c:\count.txt,
>>change as needed. Only works for NT and probably 2000.
>>
>>Should make you look good!
>>
>>Hope it helps...Adrian
>>
>>
>>**** BEGIN CMD FILE (dont include this line) ****
>>@echo off
>>set cd=
>>for /f "tokens=* delims= " %%? in (
>>'dir /a-d /b e:\cfm\*.cfm') do call :countlines %%?
>>goto :EOF
>>
>>:countlines
>>set file=%*
>>if not defined cd set file=%file:~1%
>>for /f "tokens=* delims=" %%? in (
>>'type "e:\cfm\%file%"
>>^| find /v /c "$^&Z^@^!$"') do set /a rc=%%?
>>set /a rc-=1
>>echo>>c:\count.txt file e:\cfm\%file% has %rc% lines
>>goto :EOF
>>:EOF
>>**** END CMD FILE (dont include this line) ****
>>
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 x204 Fax 1.212.679.8032

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to