WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: mjwillyone on November 10, 2021, 09:08:51 AM

Title: Is it possible to handle 1 particular error code number?
Post by: 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.
Title: Re: Is it possible to handle 1 particular error code number?
Post by: JTaylor on November 10, 2021, 10:31:04 AM
IntControl 73.

Jim
Title: Re: Is it possible to handle 1 particular error code number?
Post by: td on November 10, 2021, 01:20:46 PM
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.
Title: Re: Is it possible to handle 1 particular error code number?
Post by: mjwillyone on November 11, 2021, 01:56:37 AM
Thanks both of you!  I will work on this and get it fixed!