Draft for Information Only
ContentMS DOS Command: PROMPT
MS DOS Command: PROMPTReference from Microsoft MS-DOS cmd help DescriptionChanges the appearance of the command prompt. You can customize the command prompt to display any text you want, including such information as the name of the current directory, the time and date, and the MS-DOS version number. SyntaxPROMPT [text]
Parameters
Related CommandsFor information about setting the current date and time, see the DATE and TIME commands. For information about ANSI escape sequences, see the ANSI.SYS topic. RemarksUsing the PROMPT command without the text parameterWhen you use the PROMPT command without specifying a value for text, PROMPT resets the command prompt to the default setting--the current drive letter followed by a greater-than sign (>). Using the $P value for textIf you include the $P character in the text parameter, MS-DOS reads your disk after you enter each command to determine the current drive and path. This can take extra time, especially for floppy disk drives. Defining the MS-DOS command prompt in WindowsIf you use Microsoft Windows 3.1, you can change the command prompt with the WINPMT environment variable. For example, suppose you want the following message to precede the MS-DOS command prompt: Type "exit" when you're ready to return to Windows. To display this message, include the following command to your AUTOEXEC.BAT file: set winpmt=Type "exit" when you're ready to return to Windows.$_$p$g ExamplesThe following example sets the command prompt to display the current drive and path followed by the greater-than sign (>): prompt $p$g The following command displays a two-line prompt in which the current time appears on the first line and the current date appears on the second line: prompt time is: $t$_date is: $d If your CONFIG.SYS file loads ANSI.SYS, you can use ANSI escape sequences in your prompts. The following command, for example, displays your prompt in reverse video mode and returns to usual video mode for other text: prompt $e[7m$n:$e[m The characters following the escape code ($E) are ANSI escape sequences. ©sideway ID: 110700239 Last Updated: 7/29/2011 Revision: 0 Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019