220-1102 exam dumps

220-1102 practice question 102 of 828

A+ Core 2. Associate level, CompTIA. Free question with the correct answer and a full explanation.

220-1102 Question 102

Single answerdir

A support technician is connected to a Windows 10 PC through Command Prompt and needs to verify whether a user’s Documents folder contains any files with the .docx extension before starting a backup. The technician wants to see only the matching filenames in C:\Users\JSmith\Documents without extra details such as file size, date, or summary information. Which command should the technician use?

  1. A

    dir C:\Users\JSmith\Documents*.docx /b

  2. B

    dir /s C:\Users\JSmith\Documents*.docx

  3. C

    cd C:\Users\JSmith\Documents*.docx

  4. D

    tree C:\Users\JSmith\Documents*.docx /f

Show answer and explanation

Correct answer: A

Explanation

In Windows Command Prompt, dir is the standard command for listing directory contents. To filter by file type, technicians commonly use wildcards such as *.docx. When only filenames are needed, /b (bare format) is the best choice because it removes extra details like timestamps, file sizes, and totals. By contrast, /s causes dir to search subdirectories recursively, which is useful in some troubleshooting situations but was not requested here. This aligns with standard Microsoft Command Prompt usage for dir, where switches such as /b and wildcard matching are used to tailor output for administrative and support tasks.

  • A. Correct.

    Correct. The dir command lists files and folders, and the wildcard *.docx limits the results to Word documents in that folder. The /b switch uses bare format, which displays only filenames and paths without additional metadata such as size or timestamps. This matches the requirement to see only the matching names in the specified directory.

  • B. Incorrect.

    Incorrect. This command would search recursively through the folder and all subfolders because of the /s switch. It also does not suppress the normal detailed output, so it would include more information than requested. A technician might choose this option thinking /s means 'show results,' but in dir it means to include subdirectories.

  • C. Incorrect.

    Incorrect. The cd command changes the current directory; it does not list files. It also cannot change into a file path such as *.docx. This distractor reflects a common confusion between navigating to a location and displaying the contents of a location.

  • D. Incorrect.

    Incorrect. The tree command displays the directory structure and, with /f, can include file names, but it is intended for showing folder hierarchies rather than filtering for a specific file extension in a simple list. It would produce output that is less targeted and more verbose than required.

Timed practice exam

Take a 220-1102 practice test under exam conditions

90 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam