Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am currently outputting a table to a txt file on a network drive using the following command:
Store Table Into "\\Folder\File.csv" (txt);
This works fine unless another user has the file open when the script runs (and therefore the script cannot write to the file), I get a general script error, and the script ends.
What I would expect to be able to do is handle the error, but I can't; the script exits on the general script error without any opportunity to handle it.
How can I resolve this issue?
Thanks!
Hi Daniel,
using the variable ErrorMode you can first make sure that the script will not exit upon hitting on that error.
=> That will let you proceed, and you can use the variable ScriptErrorCount to determine whether or not your command has succeeded.
=> In case it hasn't because someone has it open, you could, like, take a timestamp and then make the script try again after a certain nr. of minutes has passed. Unfortunately there doesn't seem to be sth like a >Wait< function, but I'm sure that you can find a way to do that.
Thanks - I have set the ErrorMode variable to ensure it doesn't exit; but it exits anyway!