Hi there, I am trying to achieve a pretty simple task here, i'm just cant seem to think how to do what i want properly though...

I currently have a batch file that looks like the following:
@echo off
color 91
DEL /F file.exe
DEL /F file.exe
DEL /F file.exe >log.txt

basicly it attempts to delete the same file a few times in a row.
I've tried to make it so it creates a log with the results, but it didnt seem to work...

I would like to have it check for when it has success, then creates a log with the "file has been successfully deleted" message that comes up after it, then have it exit the batch file.

Then If it does not have success by the end of the batch, I want it to create a log with the error.



Is there anyone who has experience in batch file creation that could help me out here?