The issue happens when path is not created, e.g., Archive/% archive and Archive does not exits. If Path exists, file gets created no problem, so just need to check path and create that too.
The reason it's a bit issue - script first deletes completed tasks and then fails at file creation. This means tasks can be deleted before they are copied over, and that is not acceptable data loss.
The issue happens when path is not created, e.g.,
Archive/% archive
andArchive
does not exits. If Path exists, file gets created no problem, so just need to check path and create that too.The reason it's a bit issue - script first deletes completed tasks and then fails at file creation. This means tasks can be deleted before they are copied over, and that is not acceptable data loss.