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.
In which case, you just do a search from the root directory, then order the bak files by date and delete all the ones older than 2 weeks. folder on my C-drive called (you guessed it) "Bakfiles". From there it's very simply to delete older files no longer needed. I use the MOVEBAK command.
Force delete using Windows With the command prompt open, enter del /f filename , where filename is the name of the file or files (you can specify multiple files using commas) you want to delete.
It can be a single command.
del /s /q /f c:\*.bak
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With