Copy all files from folder

  • How can I copy all files from folder.

    G:\MainFolder\Folder\
    Inside this Folder has txt files. I want to move all this txt files into G:\MainFolder

  • girl_bj - Sunday, August 26, 2018 8:24 AM

    How can I copy all files from folder.

    G:\MainFolder\Folder\
    Inside this Folder has txt files. I want to move all this txt files into G:\MainFolder

    https://devjef.wordpress.com/2013/06/28/moving-files-with-ssis/

  • girl_bj - Sunday, August 26, 2018 8:24 AM

    How can I copy all files from folder.

    G:\MainFolder\Folder\
    Inside this Folder has txt files. I want to move all this txt files into G:\MainFolder

    It's a real shame that people don't use or even know the basics anymore.  This is a trivial task easily done without loops, GUIs, or any of the other unnecessary stuff if you go back to the simplicity of the operating system.

    MOVE "G:\MainFolder\Folder\*.txt" "G:\MainFolder\"

    --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)

  • Jeff Moden - Sunday, August 26, 2018 11:06 AM

    girl_bj - Sunday, August 26, 2018 8:24 AM

    How can I copy all files from folder.

    G:\MainFolder\Folder\
    Inside this Folder has txt files. I want to move all this txt files into G:\MainFolder

    It's a real shame that people don't use or even know the basics anymore.  This is a trivial task easily done without loops, GUIs, or any of the other unnecessary stuff if you go back to the simplicity of the operating system.

    MOVE "G:\MainFolder\Folder\*.txt" "G:\MainFolder\"

    To execute this in SSIS, you're going to need an Execute Process task which references cmd.exe as its executable (example here).

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply