Script that erases files by Spellnumber

Asked

Viewed 164 times

1

I wanted to delete several types of extensions, but I don’t know how to increment if in batch, someone could help me and teach me how to increment 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.
  • It has to be exactly on Windows? On linux, this would be pretty easy. But it displays some message when you run?

  • please for windows, I already left the operation message finished as soon as it delete.

  • Douglas, I don’t understand much batch, but if you give a help, I’d like to +/- this

  • I posted the answer below. If you solve your problem, please mark as Accept :)

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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.