The "more" console command. Help.

Hi m8s

Have you been in front of a DOS window with nothing more than the command shield starting diskete in hand (msdos.sys, io.sys and command.com) and needing to preview in screen the contents of a txt file? I am sure a lot here know what I am speaking about.

You could use "type abc.txt", but you now that it spilts the file contents all at once and you have to use the "pause" key :). I have used one time the more command for having a nice screen by screen output, but I cannot remember what was the exact syntax. I have been testing and I could see that it is even possible to mess with the file if you do it wrong. I apeal to your knowledge guys. I know that it was something like "more <filename.txt>....." but I can be far from the target :)

I know it is even possible to EDIT a file using commands like this, or the copy command, but I don't know how to do it.

Thanks a lot for all the help m8s.
 
C:\WINDOWS\COMMAND>more /?
Displays output one screen at a time.

MORE [drive:][path]filename
MORE < [drive:][path]filename
command-name | MORE [drive:][path][filename]

[drive:][path]filename Specifies file(s) to display one screen at a time
command-name Specifies a command whose output will be displayed.


Many people use -
TYPE filename |MORE

but a better method is -
MORE < filename
Though I never realized it worked without the < as well

There are other useful filters, such as FIND

C:\WINDOWS\COMMAND>find/?
Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.

If a pathname is not specified, FIND searches the text typed at the prompt
or piped from another command.
 
Top