More Command

Examples, options, switches, and additional information on the 'more' command

In This Article

Jump to a Section

The more command paginates the results of other commands—when it's used with them in the correct way.

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 procedure.

The more command shows the contents of one or more files, one page at a time, but it's 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 11, Windows 10Windows 8Windows 7Windows Vista, and Windows XP.

It's available from Advanced Startup Options and System Recovery Options as well. Recovery Console in Windows XP also includes the more command.

The availability of certain more command switches and other more command syntax may differ from operating system to operating system.

Syntax for the More Command

This is the syntax required when using the command to paginate the results of a different command:

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

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

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

See How to Read Command Syntax if you're confused about how to read the command syntax or how it's explained in the table below.

More Command Options
Option Explanation
command-name | This is the command you're executing, which could be any command that might produce more than one page of results. Include 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.
/c Use this switch with the more command to automatically clear the screen prior to execution. This also clears the screen after each pagination, meaning you won't be able to scroll up to see the entire output.
/p The /p switch forces the output of whatever is being displayed (e.g. a command output or text file) to respect the "new page" form feed character.
/s This option compacts the output on the screen by reducing multiple blank lines to a single blank line.
/tn Use /t to swap out tab characters with n number of spaces when displaying the output in the Command Prompt window.
+n The + 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 won't get an error, just an empty output.
drive:, path, filename This is the file (filename, optionally with drive and path, if required) to display in Command Prompt. To view the contents of several 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.

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

An elevated Command Prompt is not required for full use of the 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

Here are a couple examples that show how the command can be used:

Shorten DIR Command Results

dir | more

In this example, the more command is used with the dir command, paginating its often lengthy results, 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
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, outlined in the section below. Typically, however, you'd press the spacebar to advance to the next page, and so on and so on.

Show Text File Contents

more list.txt

In this example, the command displays the contents of the list.txt file in Command Prompt:

Milk
Cheese
Yogurt
Avocado
Broccoli
Bell peppers
Cabbage
Edamame
Mushrooms
Spaghetti squash
Spinach
Cherries
Frozen berries
Melons
Oranges
Pears
Tangerines
Brown rice
Oatmeal
Pasta
Pita bread
Quinoa
Ground beef
Chicken
Garbanzo beans
-- More (93%) --

Since the more command has full access to the file you're displaying, it knows from the start how much it's displaying on the screen, showing a percentage indication as to how complete the output is.

This example could be adjusted to start at the 10th line by slightly modifying the command:

more +10 list.txt

The printout in Command Prompt would display Spinach, then Cherries, and so on.

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

Options at the 'More' Prompt

Use one of these options when you encounter a More prompt:

Additional More Command Options
Option Explanation
Press spacebar to advance to the next page.
Press Enter to advance to the next line.
p n Press p and then, when prompted, the number of lines, n, that you'd like to see next, followed by Enter.
s n Press s and then, when prompted, the number of lines, n, that you'd like to skip before displaying the next page. Press Enter to proceed.
f Press 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.
q Press q to exit display of the file(s) or command output. This option 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 brief reminder of your options at this prompt.

If you can't make these options work, execute the command again but add /e to the list of options you're using.

Was this page helpful?