Keep track in a variable at all time of the last executing: @ ... dir1.sql encountered, and, when you meet an ERROR line, you know that you can delete the SQL file whose name is in the last-sql-file variable (if the file still exists).
No need to read backward.
In reply to Re: Parse the text file output and delete files
by Laurent_R
in thread Parse the text file output and delete files
by Gaurav99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |