opc.three (6/10/2013)
If anyone is interested in taking the detour named "xp_cmdshell" (I am not) please see these posts below where Jeff, and sometimes myself too, espouse the merits and demerits of xp_cmdshell. Please read the discussions as well as Microsoft MVP's comments and Best Practices documentation available all over the internet and in books have said on the topic and make up your own mind.If you could use xp_CmdShell securely, would you?
How to prevent ANY use of xp_CmdShell?
How to call a batch file to execute from an SP
@sql_enthusiast, I apologize for the potential derailment of the thread that you started to hopefully get some help writing some lines of code to help you with your project. Hopefully my previous post to this one addressed your original question about how to find the newest file in a directory using a VB.net Script Task in SSIS. If not, then feel free to send me a Private Message, or it might be easy to simply start a new thread.
And please understand that some "Best Practices" are merely perceptions on the part of the writer. Microsoft, for example, makes no claims as to the accuracy of even the latest security document. Keep in mind that such "official" documents say "Use only if needed" and that changes to "Use if needed" if you need it. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.