I\'m trying to make a batch file on Windows for deleting all the files in the current directory but excluding 4 file extensions (log, sdb, SDK, bat).
I have tried th
@echo off setlocal EnableDelayedExpansion set exclude=.log.sdb.sdk.bat. for %%f in (*.*) do ( if /I "%exclude%" == "!exclude:%%~Xf.=!" del "%%f" )