Is it possible in batch file to call more than one command in a single FOR loop, let's say for example I want to print the file name and after delete it.
@ECHO OFF
FOR /r %%X IN (*.txt) DO (ECHO %%X DEL %%X)
REM the line above is invalid sintax.
I know in this case I could solve it by doing two distinct FOR loops: one for showing the name and one for deleting the file, but is it possible to do it in one loop only???
Thanks!