More Command

More Command Examples, Options, Switches, and More

Screenshot of the More command in a Windows 10 Command Prompt
More Command (Windows 10).

The more command is a Command Prompt command used to paginate the results of other commands when used with them in the correct way.

Tip: If easy access to large command outputs is what you're after, saving the results of a command using a redirection operator might be a better way to go. See How to Redirect Command Output to a File for more on this.

The more command can also be used to show the contents of one or more files, one page at a time, but is rarely used this way.

The type command duplicates this functionality and is more commonly used for this particular task.

More Command Availability

The more command is available from within the Command Prompt in all Windows operating systems including Windows 10Windows 8Windows 7Windows Vista, and Windows XP.

Older versions of Windows include the more command as well but with considerably less flexibility (e.g. less options) than those I discussed above. The more command is also a DOS command, available in most versions of MS-DOS.

The more command can be found in the Command Prompt tool that's available from Advanced Startup Options and System Recovery Options as well. Recovery Console in Windows XP also includes the more command.

Note: The availability of certain more command switches and other more command syntax may differ from operating system to operating system, even Windows XP through Windows 10.

Syntax for the More Command

This is the syntax required when using the more command to paginate the results of a different command, the most common use:

command-name | more [/c] [/p] [/s] [/tn] [+n] [/?]

Here is the syntax for using the more command to show the contents of one or more files:

more [/c] [/p] [/s] [/tn] [+n] [drive:][path]filename [[drive:][path]filename] ...

Tip: See How to Read Command Syntax if you're confused about how to read the command syntax as I've written it above or how it's explained in the table below.

command-name |This is the command that you're executing, which could be any command that might produce more than one page of results in the Command Prompt window. Don't forget to use the vertical bar between the command-name and the more command! Unlike vertical bars or pipes used in the syntax for other commands, this one should be taken literally.
/cUse this switch with the more command to automatically clear the screen prior to execution. This will also clear the screen after each pagination, meaning you won't be able to scroll up to see the entire output.
/pThe /p switch forces the output of whatever is being displayed (e.g. a command output, a text file, etc.) to respect the "new page" form feed character.
/sThis option compacts the output on the screen by reducing multiple blank lines to a single blank line.
/tnUse /t to swap out tab characters with n number of spaces when showing the output in the Command Prompt window.
+nThe + switch starts the display of whatever is being outputted to the screen at line n. Specify line n beyond the maximum lines in the output and you will not get an error, just an empty output.
drive:, path, filenameThis is the file (filename, optionally with drive and path, if required) that you want to view the text-based contents of in the Command Prompt window. To view the contents of multiple files at once, separate additional instances of drive:, path, filename with a space.
/?Use the help switch with the more command to show details about the above options directly in the Command Prompt window. Executing more /? is the same as using the help command to execute help more.

Tip: A /e option is also an approved switch but seems to be implied at all times, at least in newer versions of Windows. If you have trouble getting some of the switches above to work, try adding /e when executing.

Important: An elevated Command Prompt is not required for full use of the more command but will, of course, be required if you use command-name | more where the command-name specified otherwise requires elevation.

Examples of the More Command

dir | more

In the above example, the more command is used with the dir command, paginating the often lengthy results of this command, the first page of which would look something like this:

 Volume in drive D is Backup & Downloads
Volume Serial Number is E4XB-9064
Directory of D:\Files\File Cabinet\Manuals
04/23/2012 10:40 AM <DIR> .
04/23/2012 10:40 AM <DIR> ..
01/27/2007 10:42 AM 2,677,353 a89345.pdf
03/19/2012 03:06 PM 9,997,238 ppuwe3.pdf
02/24/2006 02:19 PM 1,711,555 bo3522ug.pdf
12/27/2005 04:08 PM 125,136 banddek800eknifre.pdf
05/05/2005 03:49 PM 239,624 banddekfp1400fp.pdf
08/31/2008 06:56 PM 1,607,790 bdphv1800handvac.pdf
05/05/2008 04:07 PM 2,289,958 dymo1.pdf
02/11/2012 04:04 PM 4,262,729 ercmspeakers.pdf
07/27/2006 01:38 PM 192,707 hb52152blender.pdf
12/27/2005 04:12 PM 363,381 hbmmexpress.pdf
05/19/2005 06:18 AM 836,249 hpdj648crefmanual.pdf
05/19/2005 06:17 AM 1,678,147 hpdj648cug.pdf
01/26/2007 12:10 PM 413,427 kiddecmkncobb.pdf
04/23/2005 04:54 PM 2,486,557 kodakdx3700dc.pdf
07/27/2005 04:29 AM 77,019 kstruncfreq.pdf
07/27/2006 01:38 PM 4,670,356 magmwd7006dvdplayer.pdf
04/29/2005 01:00 PM 1,233,847 msbsb5100qsg.pdf
04/29/2005 01:00 PM 1,824,555 msbsb5100ug.pdf
-- More --

At the bottom of that page, all of which you see in the Command Prompt window, you'll notice a -- More -- prompt. Here you have additional options, all of which are outlined in the section below. Typically, however, you'd press the spacebar to advance to the next page, and so on and so on.

more list.txt

In this example, the more command is used to show the contents of the list.txt file in the Command Prompt window:

Bell peppers
Spaghetti squash
Frozen berries
Brown rice
Pita bread
Ground beef
Garbanzo beans
-- More (93%) --

Since the more command has full access to the file that you're displaying, it knows from the start how much it's displaying on the screen, giving you a percentage indication, -- More (93%) -- in this case, as to how complete the output is.

Note: Executing more without a filename or any options is allowed but doesn't do anything useful.

Options Available at the -- More -- Prompt

A number of additional options are available when you see the -- More -- prompt at the point of pagination when using the more command:

<space>Press the spacebar to advance to the next page.
<enter>Press Enter to advance to the next line.
p nPress p at the -- More -- prompt, and then, when prompted, the number of lines, n, that you'd like to see next, followed by Enter.
s nPress s at the -- More -- prompt, and then, when prompted, the number of lines, n, that you'd like to skip before displaying the next page. Press Enter to proceed.
fPress f to skip to the next file in your multi-file list of files to display. If you've only specified a single file to output, or you're using the more command with another command, using f will exit whatever you're showing right now and return you to the prompt.
qPress q at the -- More -- prompt to exit display of the file(s) or command output. This is the same as using CTRL+C to abort.
=Use the = sign (just once) to show the line number of the output that you're at right now (i.e. the line you're seeing just above -- More --).
?Type a ? when you're between pages to show a quick reminder of your options at this prompt, unfortunately without any explanations.

Tip: As I mentioned in the original syntax discussion, if you have trouble getting these options to work, execute the command again but add /e to the list of options you're using.

Was this page helpful?