Script that deletes files by the extensions

1

I want to delete several types of extensions, so I do not know if I'm incrementing in batch, someone could help me and teach me how to increment the if in the code below:

@echo off
cd E:\comp_softwares
pause
Del /f /s /q *.mp3
pause
cls
echo Operacao Terminada.
pause>null
exit.
    
asked by anonymous 19.05.2016 / 21:05

1 answer

2

The basic syntax is this:

if "%variavel%" == "XD" (
    Comandos a serem executados
) ELSE (
    Comandos a serem executados
)

Now you need to adapt to your script.

    
19.05.2016 / 21:16