AndrewSQLDBA (3/30/2013)
Why not get away from the old fashioned batch files, and use a simple SSIS package? That would be so much more simple, more efficient and much more secure. And everything would be nicely contained in the MSDB database. You can do so much more in the package, like checking to see if your source file actually exists before processing, moving the file to another directory after the processing is complete, or just deleting the file if you do not want to keep it. And you can easily schedule the package to fire off when needed.Andrew SQLDBA
You can do that all through T-SQL as well. Yep... it requires the use of xp_CmdShell to do the moves but everything else can be done without xp_CmdShell. xp_CmdShell can also be used very securely if your system has proper security to begin with. If the system doesn't have proper security, then you might have some folks using it or a work around that you might not expect even if xp_CmdShell is disabled. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.