• SQL-DBA-01 (4/23/2015)


    Can you please suggest all the files from one location to another using the temp table (#FileDetails)?

    I have a rmeote location where I want to copy all the files from local server to remote share.

    I have xp_cmdshell offers copy/move features but wanted to know if you have drafted already any other good script, can make use of it.

    Fianlly great script..

    Thank you for the feedback. I'll try to provide more detail tonight but I'm on a major project and might not get to it until the weekend.

    In the meantime, do a search for "RoboCopy", which is a part of Windows just like the "Copy" and "XCopy" (another seriously useful tool) commands are.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)