Examveda

Which switch should be used in the DIR command to view files in all directories?

A. /p

B. /w

C. /s

D. /l

Answer: Option C

Solution (By Examveda Team)

In MS-DOS, the dir command is used to list the files and directories in the current directory. Here's an analysis of each option:

/p:
This switch is used in the dir command to display the results one screen at a time, pausing after each screenful of information. It does not list files in all directories.

/w:
This switch is used to display a wide list format with filenames listed across the page. It does not list files in all directories.

/s:
This switch is used to display files in all directories and subdirectories of the current directory. It recursively lists files from the current directory down through all levels of subdirectories.

/l:
This switch is not valid in the dir command for viewing files in all directories. It typically represents lowercase conversion, but not in the context of listing files in directories.

Therefore, the correct answer is Option C: /s, which should be used in the DIR command to view files in all directories.

This Question Belongs to Computer Science >> Disk Operating System (DOS)

Join The Discussion

Related Questions on Disk Operating System (DOS)