I have a simple program which deletes a file based on the extension, which is triggered by a Windows Task. I would like to create a log file which if ran would say successful or if it failed would say Delete Failed. I'm not sure how to create the log file for this.
@echo off
del "D:\BACnet-CSV\Test csv files\Test1\*.csv"
IF %ERRORLEVEL% NEQ 0 goto ERROR
echo SUCCESSFUL
exit /b 0
:ERROR
echo Delete Failed
exit /b 1
Thanks
I've searched the Web and tried several things, just couldn't get it to show correctly.