220-1102 exam dumps

220-1102 practice question 243 of 828

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

220-1102 Question 243

Single answerfind

A technician is helping a Windows 10 user who says an important PDF saved somewhere under the Documents folder cannot be located. The user remembers part of the filename includes the word "invoice" but does not remember the exact subfolder. The technician wants to search from Command Prompt and include all subfolders. Which command should the technician use?

  1. A

    find "invoice" C:\Users\User\Documents*.pdf /s

  2. B

    dir C:\Users\User\Documents*invoice*.pdf /s

  3. C

    grep -r "invoice" C:\Users\User\Documents*.pdf

  4. D

    where /r C:\Users\User\Documents invoice*.pdf

Show answer and explanation

Correct answer: D

Explanation

This question tests practical use of Windows command-line tools to locate files, a task relevant to A+ Core 2 support scenarios. In Windows, find is used to search for text within files, not to locate files by filename. That distinction is important because technicians often confuse content-search tools with filename-search tools. The where command is the best match here because it is designed to locate files that match a pattern, and the /r switch performs a recursive search through subdirectories. Microsoft command documentation distinguishes these tools clearly: where searches for files matching a pattern, while find searches for text strings inside files. Although dir with /s can also display matching files recursively, where is the more purpose-built command for this task in Command Prompt.

  • A. Incorrect.

    Incorrect. In Windows Command Prompt, find searches for text inside files, not for filenames. It would look for the string "invoice" within file contents and this syntax is not the correct way to recursively search for matching PDF filenames. This is a common confusion because the command name suggests general searching.

  • B. Incorrect.

    Incorrect. This command is close and can recursively list files matching a wildcard pattern with /s, so it may appear correct. However, dir is primarily a directory listing command rather than the most appropriate search tool for locating a file by name from the command line in this scenario. On A+ Core 2, where is the Windows command specifically intended to locate files by name and path.

  • C. Incorrect.

    Incorrect. grep is commonly used on Linux and other Unix-like systems, not standard Windows Command Prompt. A candidate might choose this if they are more familiar with Linux text-search tools, but it is not the correct native command for a typical Windows 10 Command Prompt environment.

  • D. Correct.

    Correct. The where command in Windows can locate files by name, and the /r switch tells it to search recursively from the specified root path. Using "where /r C:\Users\User\Documents invoice*.pdf" will search the Documents folder and all subfolders for PDF files whose names begin with invoice, which matches the user's partial filename information.

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