The Perfect Use of command prompt Now

These commands repeat the main system calls that concern files. It is therefore a good approach to understand the role of the operating system. In the event of major problems, they can sometimes be used to troubleshoot by launching the system restore tool from a safe start with the command prompt .

command prompt

These commands are essential for making “.bat” or “.cmd” command files useful for automating repetitive tasks. Some commands only work in “DOS mode” now called “command prompt mode”. It is always necessary to know how to use a text interface still used by certain programs:

  • FDISK, FORMAT, old commands but sometimes still useful for partitioning and formatting disks,
  • PING, IPCONFIG, ARP, NET NET and other similar commands for configuring a network
  • Or in other environments such as Linux in “terminal mode”

Files and directories

The data saved on the disc is there in the form of documents called “files”. Initially, the word file means “collection of files”. For an uninitiated, the term is confusing because in computer science the word file is used to designate ONLY ONE document. “File” and “Document” are synonyms here.

Documents are grouped in directories also called folders.

These are organized according to a hierarchical tree structure. Each directory may contain other directories which in turn may contain still other directories.

File and directory names

The files and the directories have names which at the time of DOS had the format 8.3: eight characters at most followed by a period and a maximum of three characters of extension.

These names could not contain accented characters or special characters such as $, §, #, space etc. only the white character underlined ‘_’ was allowed.

These restrictions have disappeared since Windows 95. Spaces are even allowed in names which can now be long, but these spaces are still misinterpreted by DOS commands. It will be necessary to put these names which contain spaces between quotes so that the shell does not consider as distinct file names.

E.g. COPY “Letter to Santa Claus.pdf” C: \ Courier \ archives

A name like LettrePereNoel.pdf will be easier to use for writing scripts or for portability of the document to other systems. Preferably use the conventions recommended in programming to name variables: a capital letter for each new word. The root directory, the root directory, doesn’t really have a name. It is designated by the back-slash character ‘\’.

The full name of a file is its name preceded by the full path which allows you to find it from the root directory.

E.g. C: \ Course \ OS \ Chap1.txt

C: is the name of the disk, the first \ is the acronym of the root directory, Cours is the name of a directory and OS that of one of its sub-directories, the others are separators, and finally Chap1. Txt is a filename. Note also that DOS is not case-sensitive. This does not mean that it is particularly robust but that for DOS upper and lower case, it is the same thing.

The guest

C: \> _

The DOS prompt or prompt is the waiting message that indicates that the system is ready to receive a command. The prompt indicates the position of the active directory: the default disk name (here C:) followed by the full path from the root directory represented by the character ” back-slash ” ‘\’.