Is it possible to handle 1 particular error code number?

Started by mjwillyone, November 10, 2021, 09:08:51 AM

Previous topic - Next topic

mjwillyone

Hello all!  I have 1 error code which comes up at times after I run a long Winbatch routine.  The error code is #1590.  Is there a way to handle what I wish to happen after this 1 particular error comes up?  When it happens, it is always at the very end of the script.  I simply wish to close the script and be done.

JTaylor


td

Quote from: mjwillyone on November 10, 2021, 09:08:51 AM
Hello all!  I have 1 error code which comes up at times after I run a long Winbatch routine.  The error code is #1590.  Is there a way to handle what I wish to happen after this 1 particular error comes up?  When it happens, it is always at the very end of the script.  I simply wish to close the script and be done.

The error text for the error is "FileDelete: File could not be deleted" so the function causing the problem is fairly certain. It would be better to change the script to handle the situation that caused the error. You can use the FileExist or the FileLockItemize function to check if the file is locked by another process and, therefore, not removable.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

mjwillyone

Thanks both of you!  I will work on this and get it fixed!