Batch file to delete files with .bak extension

Sweeper picture Sweeper · Apr 4, 2014 · Viewed 44.8k times · Source

In batch, I want to delete all files *.bak in various folders on disk c:\.
Can anyone help me?

ex.:

all c:
del *.bak /s /a

Thank you.

Answer

foxidrive picture foxidrive · Apr 5, 2014

It can be a single command.

del /s /q /f c:\*.bak