@ECHO Off REM -- Prepare the Command Processor Setlocal Enabledelayedexpansion Title Fastcopy_delete_file_folders_v1.bat REM Description: This script uses FastCopy to delete files and folders REM This file provides two options for deleting files with FastCopy REM This batchfile pauses when execution is completed REM set path for external apps. Currently set for a portable installation set path="F:\Utilities\Fastcopy";%path% ECHO. ECHO Delete from: %~p1 ECHO Delete the following files and/or Folders? Only 1st three displayed: ECHO 1. %~nx1 && if exist "%~2" ECHO 2. %~nx2 && if exist "%~3" ECHO 3. %~nx3 ECHO. :menu ECHO ------------------- FastCopy Delete -------------------------------- ECHO. ECHO 1. Delete no confirmation, no log ECHO 2. Delete w confirmation, log FastCopy_delete_file_folders_bat.log ECHO 3. tbd ECHO 4. Exit ECHO. SET PROFILE= set /P PROFILE=Enter your selection (0-4): if "!PROFILE!"=="1" goto noconfirm if "!PROFILE!"=="2" goto confirm if "!PROFILE!"=="3" tbd if "!PROFILE!"=="4" goto end ECHO. ECHO "You must select a valid choice^! Try again^!" pause cls ECHO. goto menu ECHO. :next :noconfirm REM NO conformation before deleting, no log ECHO. ECHO deleting ... FastCopy.exe /cmd=delete /log=FALSE /no_confirm_del /auto_close %* ECHO. ECHO Process completed ... ECHO. goto bye :confirm REM Conformation before deleting and logging ECHO. ECHO deleting ... FastCopy.exe /cmd=delete /auto_close %* ECHO Process completed .... ECHO. :bye 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