• Hi kenneth,

    No its does not require sysadmin rights to run these proc. You can specifically assign access to all 5 sp_oa .... proc. I am not getting any hint anywhere. As per BOL, the code below should work, but its not working.

    Anyway i have got a way out. pls. check the code as below ..... if any one find any thing wrong in it pls. let me know......

    DECLARE @oFS INT

    DECLARE @oFol INT

    DECLARE @oFC INT

    DECLARE @oFil INT

    DECLARE @Path VARCHAR(255)

    DECLARE @Path1 VARCHAR(255)

    DECLARE @FileName VARCHAR(255)

    DECLARE @NumFiles INT

    DECLARE @RetCode INT

    DECLARE @ErrObject INT

    DECLARE @Description VARCHAR(255)

    DECLARE @Count INT

    EXEC @RetCode = sp_OACreate 'Scripting.FileSystemObject', @oFS OUTPUT

    SET @Path = 'D:\TEST\Test1\REN071219001.dat'

    SET @Path1 = 'D:\TEST\Test2\REN071219001.dat'

    EXEC @RetCode = sp_OAMethod @oFS, 'GetFile', @oFol OUTPUT, @Path

    select @oFol,@RetCode

    EXEC @RetCode = sp_OAMethod @oFol, 'MoveFile' , @Path,@Path1

    select @RetCode

    Thanks

    Dhananjay