Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
loudbliss
Starting Member
37 Posts |
Posted - 2008-04-03 : 12:17:13
|
Hi Guys,Im new using SSIS and i just created a data flow that reads from multiple flat files (with a mutipleflatfiles conn manager) and inserts the files data to an sql server (with an ole db destination)The thing is i need to insert the created date property of each file im importing and i dont know how to do this.I've read i could do this with a script but im not very familiar to it.Could someone help me there? |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-04-03 : 12:22:58
|
Use FileSystemObject to read properties of file.Dim fso, FileCreatedDateset fso = CreateObject("Scripting.FileSystemObject")FileCreatedDate = fso.GetFile("c:\somefolder\somefile.dat").DateCreatedSet fso=nothing Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
loudbliss
Starting Member
37 Posts |
Posted - 2008-04-03 : 12:32:20
|
Hi harsh, thanx for your response.I actually know the vb code which is the one u sent but my big doubt is how to manage this in SSIS (i supose the script task)since im using a multipleflatfile conn manager i want to know how i save each of the created date of the files im proccesing. I have a Flat File Source, connected to a Derived Column Task that connects to a Ole Db Destination.Should i put the script task between the file source and derived column or elsewhere? and how do i connect that createddate column (filecreateddate in ur exaple) to the ole db destination.Sorry if im beeing too much of a noob here. |
 |
|
|
|
|