I could also use a line count written to another text file. So it would read the number of lines with data in a text file and then write that 'total' number to another text file. I have an everyday script to send the message to the screen.
Here's that:
const filename="S:\your file\your_info.log"
set fso=createobject("scripting.filesystemobject")
set ofile=fso.opentextfile(filename)
strcontents=ofile.readall
ofile.close
set ofile=nothing
set fso=nothing
acontents=split(strcontents,vbcrlf)
wscript.echo "REJECTIONS : " & cstr(ubound(acontents)+1)
This is run outside of MS...
Thanks in advance, Ed
Struggling 2
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
In your earlier post, you said that were reading every line. Just add a line to increment a counter with every line read. When EOF then send count to file. Something like this:
Label>Start
Let>Line=0
Label>Read
Add>Line,1
ReadLn>%SourcePathFileName%,%Line%,Result
If>Result=##EOF##,Done,Read
Label>Done
//Reduce counter by one for last count which was for EOF
Sub>Line,1
//Send line count to a text file
WriteLn>%PathFileName%,result,%Line%
MessageModal>%SourcePathFileName% has %Line% lines.
Label>End
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!