arrow
arrow
arrow
Which command in Windows 10 CMD will delete all .log files in the current directory without asking for confirmation?
Question

Which command in Windows 10 CMD will delete all .log files in the current directory without asking for confirmation?

A.

del *.log

B.

del *.log /p

C.

del *.log /q

D.

erase *.log

Correct option is C

The correct answer is: *(C) del .log /q

Explanation:

  • The command **del *.log /q** deletes all .log files in the current directory silently, i.e., without asking for confirmation.

  • The /q switch stands for quiet mode, which suppresses prompts to confirm file deletion.


Information Booster:

  • del is used to delete one or more files from the command prompt.

  • *.log targets all files with the .log extension.

  • /q suppresses confirmation prompts for deleting read-only files as well.

  • This command only deletes files, not directories.

  • It works within the current directory unless a path is specified.


Additional Information:

  • del *.log: Deletes .log files but may ask for confirmation depending on system settings.

  • del *.log /p: Prompts before deleting each file (opposite of what the question asks).

  • erase *.log: Also deletes .log files but may still prompt, depending on file attributes and settings.

Free Tests

Free
Must Attempt

CBT-1 Full Mock Test 1

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon90 Mins
languageIcon English
Free
Must Attempt

RRB NTPC Graduate Level PYP (Held on 5 Jun 2025 S1)

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon90 Mins
languageIcon English
Free
Must Attempt

CBT-1 General Awareness Section Test 1

languageIcon English
  • pdpQsnIcon40 Questions
  • pdpsheetsIcon30 Marks
  • timerIcon25 Mins
languageIcon English
test-prime-package

Access ‘RRB NTPC’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow