Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2007, 04:30 AM
Authorized User
 
Join Date: Jul 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default Need to Count number of lines in a file

Hi Friends

   i need little help


Actually i have 2 or 3 files in a folder and i want to count the number of lines present in the files and show it on screen

File path

C:\c\123PD
C:\c\123WS
C:\c\123.rpt
C:\c\45PD
C:\c\45WS
C:\c\45.rpt
I want to open them ( note : i want to open all files which has PD as extension then get the first 3 char ( may be 2 or 3 digit) of PD file , like in example it would be 123 then get all the file starting with 123 like 123WS and 123.rpt then show me the number of lines present in File ( 123PD ) and File (123WS) and (123.rpt) on screen at one time )

then i will want to referesh the database table and read next set of file which is 45

the common identifier will be there will one PD one WS file present in the path always

Screen may have output field like

File PD - Show = 123PD
Number of lines = 6783

File WS - Show = 123WS
Number of lines = 73

File rpt - show = 123.rpt
Number of lines = 78

database table would be
table 1

Key would be

Line number = number (primary key ) ( value doesnt matter )
FilePD
NumberoflinesPD
FileWS
NumberoflinesWS
Filerpt
Numberoflinesrpt

the count variables names should be different for three different files


Thanks and Regards
Lawson, COBOL
__________________
Thanks and Regards
Lawson, COBOL
 
Old July 18th, 2007, 06:45 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What kind of files are these? Are they .txt, .csv, etc?

What app is the .rpt extension for?

mmcdonal
 
Old July 19th, 2007, 04:28 AM
Authorized User
 
Join Date: Jul 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default

these are cobol files with no extensions but it can renamed to txt files , if VBA can read without extension then really it would be fine
it contains text characters


Thanks and Regards
Lawson, COBOL





Similar Threads
Thread Thread Starter Forum Replies Last Post
find number of lines in .txt file dgr7 Beginning VB 6 8 July 16th, 2014 05:11 AM
how to count lines in word file arshad mahmood VB How-To 2 June 7th, 2006 09:40 PM
Count the number of output lines joyces XSLT 7 July 6th, 2005 11:49 AM
How to count total number of nodes in an xml file? nimesh XSLT 1 August 12th, 2004 03:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.