0

I want automate the delete files with .bak extension in my backup folder

I have a little CMD who ZIP all my BD .back and after this i want delete this bak but not ZIP file

I use this but dont work, the bak files are in F:\bckup

del /s /q /f "F:\bckup*.bak"

enter image description here

Bob
  • 5,335
  • 5
  • 24

1 Answers1

2

You're missing a backslash in the path.

Try del /s /q /f "F:\bckup\*.bak"

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • I really can't understand how it's possible to not only make typo (it happens), not notice it (it happens too), not notice it when troubleshooting (even this happens)... but to even *post a question here including the typo and not noticing it again*. Do people ever re-read what they write? – Massimo Feb 19 '21 at 20:27
  • well it could be that he use native paths, however `forfiles` can be also a choice if you're planning to make a delay on the deletion – djdomi Feb 20 '21 at 16:20