@ECHO Off REM -- Prepare the Command Processor Setlocal Enabledelayedexpansion Title FastFolderEraserPro_delete_file_folders.bat REM Description: Use Fast Folder Eraser Pro command line to delete a single folder and all its contents REM Drag and drop a single folder onto this batch file REM User confirmation required REM This batch script can not delete individual files. REM set path for external apps set path="F:\Utilities\Fast Folder Eraser Pro\Command-Line";%path% :begin REM Test if parameter is a file or directory set ATTR=%~a1 set DIRATTR=%ATTR:~0,1% if /I "%DIRATTR%"=="d" ( ECHO. ECHO Delete: "%~1" ECHO From: "%~p1" ECHO. ECHO Press any key to delete. To quit, click the X on on this window or use CTRL + C ... PAUSE >NUL FFECmd32.exe /path %* /r /logfail ) else ( ECHO. ECHO Drag and drop a directory only^^^! ECHO exiting ... ) ECHO. ECHO -------------------------- closing batch file -------------------------- ECHO. Endlocal ECHO. call:errorfunc ECHO. ECHO.&ECHO.Press any key to end the application. Pause>NUL&Goto:EOF REM -------------------- Function Section (outside of local) ----------------- :errorfunc ECHO The exit error code is: %ERRORLEVEL%, errorlevel will be reset to 0 on exit goto :eof REM ------------------------------ exit now ---------------------------------- :end EXIT /B 0