check folder for file and run dts

  • Hi

    I need to run dts pacakage which check one folder for file and run the pacakge when file arrived in that folder. I don't know filename so i need to check extension it's excel file.second thing to check datelastmodified because i have morethan one file so i want to check file by datelastmodified.

    Right now i have pacakage which check for only one file and convert this to atable and then delete it.

    So same thing i need to do more than one file.....

    Any help please........ 

     

     

     

  • Check this out.

    http://www.sqldts.com/default.aspx?6,103,246,0,1

    Regards

    Daniel

  • Thanks Daniel

    It's really useful article but the thing is it's ok for text file how i can work on excel file. Sorry for asking again but i am new for dts

  • Hi,

    I assume the Excel files are all in the same format?

    Unfortunately I don't have SQL 2000 on my pc to try this out. However I am expecting the it to be pretty much identical. Just replace the "Text File (Source)" object with an Excel Source object and upadte the reference to the object in the code (ie "Text File (Source)"))

    The code that updates the source to point at a different file is just the line below which I am guessing will be the same method to set the location of an Excel Source file.

    conTextFile.DataSource = DTSGlobalVariables("gv_FileFullName").Value

    The example is quite thorough and can probably be pruned quite a bit to make things simplier to understand. You could probably get away with just steps 4,5 and 6 though with the other later when you are tidying things up.

    Hope this helps.

    Regards

    Daniel

    This will also help

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtsprog/dtspapps_64z0.asp

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

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