• Have you considered using the script that's reading the files into the table to then move said file to an archive folder? Powershell may help you with this if it's an easier answer.

    get-childitem -path "\\srv1\t$\tracefiles\*.trc" | move-item -destination "\\srv1\t$\tracefiles\Archive\"

    and just have that be step 2 in the process. Someone step in if you don't mind, I know you can set it to move based off a where... and have it in the load of the files set the archive bit, and then use the powershell script to only move those with the archive bit swapped.

    For the issue where the file is in use and cannot delete. If it only reads in files without the archive bit... but sets it at the end, you wouldn't have to worry about the old files being picked up.

    This is just for an idea path, I didn't provide a complete solution. 😀

    .