tag:blogger.com,1999:blog-2303058199815958946.post336794167586984614..comments2024-03-28T10:36:35.016+01:00Comments on Microsoft SQL Server Integration Services: Get file properties with SSISJoost van Rossumhttp://www.blogger.com/profile/01125981589974671317noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-2303058199815958946.post-33752413721017140892020-05-24T10:55:23.468+02:002020-05-24T10:55:23.468+02:00Fantastic! Thank you very much Joost! Your code wo...Fantastic! Thank you very much Joost! Your code worked the first time with no modification in SSIS 2019!Unknownhttps://www.blogger.com/profile/01882490706558641871noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-45936498970955236582020-05-12T17:09:10.612+02:002020-05-12T17:09:10.612+02:00hi all my attributes dates are showing up as 1601-...hi all my attributes dates are showing up as 1601-01-01, can you help? thankschuckhttps://www.blogger.com/profile/11674430693835796885noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-46501554268241869702017-01-31T13:19:11.933+01:002017-01-31T13:19:11.933+01:00Are you refering to the document properties of a W...Are you refering to the document properties of a Word/Excel file? There are a couple of options:<br />https://msdn.microsoft.com/en-us/library/4e0tda25.aspx<br />http://stackoverflow.com/questions/29578944/author-of-a-file-using-c-sharpJoost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-88779819722002145172017-01-31T12:13:14.830+01:002017-01-31T12:13:14.830+01:00hi, please how can i apture properties like Author...hi, please how can i apture properties like Authorayencohttps://www.blogger.com/profile/16458485189019901206noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-40334125457469469232017-01-03T07:16:56.671+01:002017-01-03T07:16:56.671+01:00Just create your own package and copy everything b...Just create your own package and copy everything between "public void Main() {" and "Dts.TaskResult = (int)ScriptResults.Success;" to your main method. If you can't get it to work fill in the contact form in the menu and let me know where you failed.Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-75481291995974361982017-01-02T20:16:45.363+01:002017-01-02T20:16:45.363+01:00Hello can I have the package to test itHello can I have the package to test itoasihttps://www.blogger.com/profile/09804708160199197389noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-59260047505583763352014-11-26T23:18:12.428+01:002014-11-26T23:18:12.428+01:00I guess you are talking about the property Last Sa...I guess you are talking about the property Last Saved By from Offices documents. It is possible, but not sure it is possible without interop (office) dll's. Try stackoverflow or one of the offices forums on MSDN.Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-77142870698299520952014-11-26T04:26:01.471+01:002014-11-26T04:26:01.471+01:00Is it possible to retrieve 'Last Saved By'...Is it possible to retrieve 'Last Saved By' from the file using script task in SSIS?On7Junehttps://www.blogger.com/profile/12188889105495166893noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-49979940059003367682014-07-17T08:51:44.850+02:002014-07-17T08:51:44.850+02:00Thank you very much for your article. I found it v...Thank you very much for your article. I found it very useful!Anonymoushttps://www.blogger.com/profile/07328447630014018796noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-43576109461490747562013-12-05T23:42:31.847+01:002013-12-05T23:42:31.847+01:00You could add some loop in the Script Task and com...You could add some loop in the Script Task and combine it with an insert query, but if you don't have programming skills then you could also add a Foreach Loop (File Enumerator) around the script task.Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-58528580080705782702013-12-04T17:13:42.807+01:002013-12-04T17:13:42.807+01:00I am trying to read all the files from the directo...I am trying to read all the files from the directory and get file attributes. Can you help me setup container and read file attributes.<br /><br />Thanks<br /><br />JPAnonymoushttps://www.blogger.com/profile/09213673699659546365noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-9378248167818147942013-06-26T18:53:53.343+02:002013-06-26T18:53:53.343+02:00Thanks a lot..It helps me a lot to load File prope...Thanks a lot..It helps me a lot to load File properties of all files in a folder to a table in database.Anonymoushttps://www.blogger.com/profile/04972187807923744371noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-17339988612652837822013-03-31T23:58:28.018+02:002013-03-31T23:58:28.018+02:00Either read the variables in a Derived Column in t...Either read the variables in a Derived Column in the next Data Flow Task or use an Execute SQL Task with these variables as parameters for an insert query.Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-23068063107187240662013-03-27T20:23:37.332+01:002013-03-27T20:23:37.332+01:00Hello Joost thanks for the update, the message now...Hello Joost thanks for the update, the message now works, is there a way I can load this information in a Table in a sql database?<br /><br />Thanks.Anonymoushttps://www.blogger.com/profile/00864901576748946810noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-7154885993071731842013-03-27T06:16:14.207+01:002013-03-27T06:16:14.207+01:00Try adding the name space in the includes:
Include...Try adding the name space in the includes:<br />Include system.windows.forms;<br />Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-60059196552523164702013-03-26T22:22:09.416+01:002013-03-26T22:22:09.416+01:00First of all thanks for the article, it really hel...First of all thanks for the article, it really helped, but I still have issues with the other script task, I connected it and edited the script putting Messagebox.Show(dts.variables("User::FilePath").value.ToString()); but it says message box does not exist in the cuurent content same as dts, I don't know what I am doing wrong, I am new to ssis tho, Also is there a way all this information can be sent to a table in a database?<br /><br />ThanksAnonymoushttps://www.blogger.com/profile/00864901576748946810noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-15490433280679204122012-08-09T13:42:01.448+02:002012-08-09T13:42:01.448+02:00Thanks for posting this and it helped alot, going ...Thanks for posting this and it helped alot, going to post soon what I have created :)C1arkhttps://www.blogger.com/profile/13859317694932765761noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-38781273263442539872012-07-26T13:38:51.062+02:002012-07-26T13:38:51.062+02:00@ranjith: the VB.Net example is made in SSIS 2008....@ranjith: the VB.Net example is made in SSIS 2008. If you still use 2005, just copy the imports rows and copy the content of my main metod to your 2005 main method. Only keep the row where the task result is set to true. You need that to replace the taskresult row from 2008.Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-17553407560340070082012-07-26T12:10:38.674+02:002012-07-26T12:10:38.674+02:00Hi Jason, Great post.
Can you elaborate the above ...Hi Jason, Great post.<br />Can you elaborate the above statement .<br />"If it's not present in yours, you should add this reference in the Project Explorer of your Script Task: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.AddIn.dll"<br /><br />Can you provide me the steps How to add this .dll to my project......<br />Thanks In advance......Anonymoushttps://www.blogger.com/profile/16671948218933924556noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-26890554399083950202012-01-26T20:01:47.086+01:002012-01-26T20:01:47.086+01:00It's just a messagebox. Something like:
Messag...It's just a <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox(v=vs.90).aspx" rel="nofollow">messagebox</a>. Something like:<br />Messagebox.Show(dts.variables("User::FilePath").value.ToString());<br /><br />Here is how you use variables in a Script Task:<br /><a href="http://microsoft-ssis.blogspot.com/2010/12/how-to-use-variables-in-script-task.html" rel="nofollow">http://microsoft-ssis.blogspot.com/2010/12/how-to-use-variables-in-script-task.html</a>Joost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-25478377430736748172012-01-26T00:03:54.879+01:002012-01-26T00:03:54.879+01:00Hi,
this is a great post ! Can you please post the...Hi,<br />this is a great post ! Can you please post the code for the second script task for the box message ? it will be really helpful.<br /><br />Thank you,Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-91645546847654006112011-04-25T21:15:41.924+02:002011-04-25T21:15:41.924+02:00@Jason Yousef: System.Addin is a standard referenc...@Jason Yousef: System.Addin is a standard reference (in my SSIS installation). If it's not present in yours, you should add this reference in the Project Explorer of your Script Task: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.AddIn.dllJoost van Rossumhttps://www.blogger.com/profile/01125981589974671317noreply@blogger.comtag:blogger.com,1999:blog-2303058199815958946.post-71548365180314546832011-04-25T17:21:21.558+02:002011-04-25T17:21:21.558+02:00Hello,
Thank you for the great article, but i'...Hello,<br />Thank you for the great article, but i'm getting error "Error 1 The type or namespace name 'AddIn' does not exist in the namespace 'System' (are you missing an assembly reference?)"<br /><br />i've added all the above references, what's missing?<br /><br />ThanksJason Yhttps://www.blogger.com/profile/01992333660672251175noreply@blogger.com