• In that case if you want to do everything in T-SQL then you will need to gain directory access. Some options are xp_cmdshell or a CLR object, there are others. I would go a different route though. Create a simple PowerShell script to iterate over any directory you need and call Invoke-Sqlcmd once for each file encountered to load the trace file into a table. When the file is loaded you can do any number of things including deleting the trace file or moving it to an archive directory, your option are wide open at that point.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato