FROM = "Drive:\Folder\File_that_does_not_exist.txt"
TO = "Drive:\Folder\File_that_does_exist.txt"
IF FileYmdHms(FROM) > FileYmdHms(TO)
RESULTS = FileCopy(FROM, TO, @False)
Message("Error", "Copy Failed")
The first problem I found was that the "IF FileYmdHms..." statement returns as True even though the FROM File does not exist.
The second problem I found during DEBUGGING, was that while the Results of the FileCopy does return False.
If I Change it to True and then continue running with the "IF !RESULTS" statement you will get an Error on the second ENDIF statement of 3357: End Error: No match found endif.
I am running Winbatch 2017A