none
Active X Script

    Question

  • Can Someone help me to write script that would go and grab file(Y1,Y2,Y3....so on) from my server (X) and then put that in another destination. Also my file has date on it which I dont need to hard code...For Example one of my file name is Planet_2-17-2014

    but I need to write script so that every time it  grab  my file it does only on "Planet". Cause everytime I grab a file that would be moved to another destination and only my latest file would be on my source destination.But again I dont want to hardcode date,


    SPPandey

    Friday, March 28, 2014 7:56 PM

All replies

  • Why did you post in the SSIS forum?

    Grab a file means what? A copy? From a server within the same network domain?

    Where the destination is?

    One possible script is just

    COPY "<source path>"/Planet*.* "<destination>"


    Arthur My Blog

    Friday, March 28, 2014 8:13 PM
    Moderator
  • I am doing this SSIS package where I need to grab a file(COPY) from a server and then do buncha of stuff like data conversion,merge and all .Once that file been copied then I need to Archive that file in different destination.So that every morning I have only one file in my source folder. The destination is the same server with different folder name. For example I will have Planet as my source folder where I have bunch of xlsx file which I need to run in my ssis package and then Archive it.

    SPPandey

    Friday, March 28, 2014 8:18 PM
  • You can use the script above in a Execute Process Task via CMD.exe.

    But better use the FileSystem Task as in https://www.youtube.com/watch?v=kBUkwaFu2mU


    Arthur My Blog

    Friday, March 28, 2014 8:33 PM
    Moderator
  • Hi SPPandey,

    Just an addition, if you indeed want to do it by using Script Task/Component, you would better ask a question in the .NET forum where you can get dedicated support.

    Regards,
    Mike Yin

    If you have any feedback on our support, please click here


    Mike Yin
    TechNet Community Support

    Friday, April 04, 2014 9:59 AM
    Moderator