I use the ‘Delete File’ function in an automation step. The trouble is, if a file is not found, I get a logging stating:
A failure in this .tas run!
Automation script “TestDelete_Daily” had errors while executing. The exception messages are listed below and the log file is attached. Change to verbose logging and rerun script for more details.
Exception Messages:
Delete_1 - Collection was modified; enumeration operation may not execute.
**That is pretty mysterious lingo, and makes it hard to diagnose. The log file states the same message. **
Can this be improved?
I think a better message might be ‘File not found: examplefilenamexx.ext’.
The problem was a bit more complicated than it might look at first. Actually, if you have several files to delete and there was only one file in the list that was missing, the whole delete operation failed. This is fixed now. I’ve just posted a new beta (2727). Try it.