Loading ...
Sorry, an error occurred while loading the content.
 

Re: [BATCH WORLD] Count the number of lines in a text file

Expand Messages
  • Michael Marquart
    On Tue, 16 Jan 2001 10:29:14 -0800 (PST) Subject: [BATCH WORLD] Count the number of lines in a text file Ismael Martinez wrote: In Win9x
    Message 1 of 3 , Jan 16, 2001
      On Tue, 16 Jan 2001 10:29:14 -0800 (PST)
      Subject: [BATCH WORLD] Count the number of lines in a text file
      Ismael Martinez <ismael_mtz@...> wrote:


      In Win9x and Msdos

      type filename.txt |find /v /c ""




      >Hello:
      >
      > Iam trying to get the number of lines in a text file (.txt or .dat),
      >does anyone know how I can do this using a batch file?
      >
      > Any response would be very appreciated.
      >
      >Ismael
    • James Zagorski
      Use the find command: find /c /v asdf;akjdf;l
      Message 2 of 3 , Jan 16, 2001
        Use the find command:

        find /c /v "asdf;akjdf;l" <filename

        /c says count the number of lines
        /v says which DO NOT CONTAIN
        "asdf;akjdf;l" is something which obviously will not be in the file
        <filename is the name of the file

        Works every time


        --- Ismael Martinez <ismael_mtz@...> wrote:
        > Hello:
        >
        > Iam trying to get the number of lines in a text file (.txt or .dat),
        > does anyone know how I can do this using a batch file?
        >
        > Any response would be very appreciated.
        >
        > Ismael
        >
        > __________________________________________________
        > Do You Yahoo!?
        > Get email at your own domain with Yahoo! Mail.
        > http://personal.mail.yahoo.com/
        >


        __________________________________________________
        Do You Yahoo!?
        Get email at your own domain with Yahoo! Mail.
        http://personal.mail.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.