In MS-DOS command usage, which command lists all files in the current working directory without switching folders?

Difficulty: Easy

Correct Answer: DIR

Explanation:

Introduction / Context:Basic file management in MS-DOS begins with enumerating files in the current directory. The standard, built-in command to display filenames, sizes, dates, and attributes is short, widely known, and available immediately after boot in most DOS versions.

Given Data / Assumptions:

  • Current directory is set (for example, C:\DATA).
  • User wants a non-destructive view of file listings.
  • No third-party shell extensions are assumed.

Concept / Approach:The DIR command reads directory entries and prints a formatted list. Optional switches (for example, /P for paging, /W for wide format, /O for sort order) control display but the base command already provides a listing of files in the current directory.

Step-by-Step Solution:

1) At the prompt, type: DIR and press Enter.2) Use DIR /P if the list is long and scrolls off screen.3) To include hidden/system files, add switches supported by your DOS version.4) Confirm output shows names and summary totals (files, bytes free).

Verification / Alternative check:Cross-check with DIR *.EXT to filter by extension; the match confirms the command genuinely lists directory entries.

Why Other Options Are Wrong:

  • LIST ALL / SHOW / SHOW ME: Not standard DOS commands.
  • None of the above: Incorrect because DIR is correct.

Common Pitfalls:Confusing DIR with TYPE (which prints file contents) or COPY (which duplicates files).

Final Answer:DIR

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion