• Unfortunately, I'm not much help either when it comes to OLE programming.

    (It's simply not turned on on my servers) 😉

    For this type of task, I use:

    exec @err = master..xp_cmdshell 'move 'D:\TEST\Test1\REN071219001.dat D:\TEST\Test2\REN071219001.dat'

    ..and that would be the end of it.

    Security concerns around xp_cmdshell is a valid point, but so is letting users create arbitrary COM objects as well, if not even more. There are ways to use xp_cmdshell with a proxy account where you can limit permissions, I'm not certain in what context a sp_OACreate object would run.

    /Kenneth