Results 1 to 4 of 4

Thread: Renaming the file after DTS package execution

  1. #1
    Ramam Guest

    Renaming the file after DTS package execution


    Hi,
    After executing a dts package to load data from a file to a SQL table. I need to rename the file after the load.
    Could any one give me a code sample so that I can add that as a task after the execution of the load in the same package

    Ramam

  2. #2
    Ray Miao Guest

    Renaming the file after DTS package execution (reply)

    Use xp_cmdshell to call ren.


    ------------
    Ramam at 11/1/00 1:47:48 PM


    Hi,
    After executing a dts package to load data from a file to a SQL table. I need to rename the file after the load.
    Could any one give me a code sample so that I can add that as a task after the execution of the load in the same package

    Ramam

  3. #3
    Guest

    Renaming the file after DTS package execution (reply)


    could you just give usage of xp_cmdshell to rename a file ?
    I wanted to give this as a task on success of my loadtask in a package

    Ramam

    ------------
    Ray Miao at 11/1/00 1:50:05 PM

    Use xp_cmdshell to call ren.


    ------------
    Ramam at 11/1/00 1:47:48 PM


    Hi,
    After executing a dts package to load data from a file to a SQL table. I need to rename the file after the load.
    Could any one give me a code sample so that I can add that as a task after the execution of the load in the same package

    Ramam

  4. #4
    Ramam Guest

    Renaming the file after DTS package execution (reply)


    I have tried using the xp_cmdshell command. It is not giving any errors but the the renaming is not happening.
    the code I used is
    master..xp_cmdshell 'ren c:
    eadme.txt c:1234.txt'

    Ramam

    ------------
    Ramam at 11/1/00 1:47:48 PM


    Hi,
    After executing a dts package to load data from a file to a SQL table. I need to rename the file after the load.
    Could any one give me a code sample so that I can add that as a task after the execution of the load in the same package

    Ramam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •