The script works OK in a patch file but as soon as i put it in a schedule task and pipe the output into a log folder it locks the log file and the process never closes. Actually i don't think these processes ever go away.
But anyway can i get these processes to close and how can it to pipe the output ">" into a log file so i can easily debug if there is an error the night before?