Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DOS utility to display 1st line of all files in directory? (Users)

posted by Doug E-mail, 18.12.2012, 06:46

Perhaps more than you're looking for, but 4DOS alternative command shell (COMMAND.COM on steroids!) has the HEAD internal command. You can set the number of lines to display as a parameter. For example:

  head /n1 /v /p *.*

  "/n1" = display only the first line of each file
  "/v" = verbose (display file name(s) also)
  "/p" = pause after each screenful
  "*.*" = all files in current directory

You can also redirect the output to a file, for example:

  head /n1 /v *.* > filename

Get the latest (last?) 4DOS binaries here (4th link down):

  http://www.4dos.info/sources.htm

I couldn't work in DOS (where i do about 90% of my computing) without 4DOS.

- Doug B.

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum