@ECHO Off REM -- Prepare the Command Processor Setlocal Enabledelayedexpansion Title delete_files_folders_fast_byenow_ntapi_v1.bat REM Description: Uses byenow with –delete-ntapi setting to delete files and folders. REM Ref: https://iobureau.com/byenow/ REM -------------------- set path for app if required ----------------------- set path="F:\Utilities\CommandlineTools\byenow\32-bit\";%path% REM ------------------------------------------------------------------------- byenow.exe "%~1" --delete-ntapi ECHO. ECHO -------------------------- closing batch file ---------------------------- ECHO. Endlocal ECHO. call:errorfunc ECHO. REM --------------------- Exit options (default is paused exit) ---------------- REM Uncomment below to exit now REM goto end REM Uncomment below to use delayed exit REM goto delayedexit REM ------------------------------- Paused exit -------------------------------- ECHO.&ECHO.Press any key to end the application ... Pause>NUL&Goto:end REM ------------------------------- Delayed Exit ------------------------------- :delayedexit REM Sets exit code to 0 ECHO exiting in 10 seconds..........&ECHO. ECHO hit PAUSE on keyboard to pause... any key will resume exit FOR /l %%a in (10,-1,1) do (TITLE %title% -- closing in %%as&ping -n 2 -w 1 127.0.0.1>NUL) Title Press any key to exit . . .&ECHO.&EXIT /B 0 REM ---------------------------------- exit now -------------------------------- :end EXIT /B 0 REM ---------------------- Function Section (outside of local) ----------------- :errorfunc ECHO The exit error code is: %ERRORLEVEL%, errorlevel will be reset to 0 on exit goto :eof