August 11, 2015 at 4:24 am
Hi Friends,
In SSIS, I am trying to get file attributes through script task. I am using FILEINFO method to collect those information. I could get all the details but 'created by' . I could not find the option who actually created the file.
How to get that? Please help me friends.
Any suggestions would be really appreciated.
Thanks,
Charmer
August 11, 2015 at 5:34 am
Charmer (8/11/2015)
Hi Friends,In SSIS, I am trying to get file attributes through script task. I am using FILEINFO method to collect those information. I could get all the details but 'created by' . I could not find the option who actually created the file.
How to get that? Please help me friends.
Any suggestions would be really appreciated.
If I right-click on a file in Windows Explorer (W7), none of the properties displayed is 'CreatedBy'. The closest thing to it is 'Owner', but it's clearly not the same thing.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
August 11, 2015 at 6:04 am
I am collecting the attributes of a dtsx file. Is there a way to collect the owner of the package or 'who created it' information?
Thanks,
Charmer
August 11, 2015 at 6:09 am
Sure, just read the XML inside the file and find the value of the DTS:CreatorName property.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
August 11, 2015 at 6:15 am
Thank you Phil, you gave me an idea
but Just curious...Is there a way to get it on the GO?
Like we get the below informations....Just curious...through vb/c# coding?
FileInfo fileinfo;
fileinfo = new FileInfo(Dts.Variables["User::VarFileName"].Value.ToString());
Dts.Variables["User::VarFileCreationDate"].Value = fileinfo.CreationTime;
Dts.Variables["User::VarFileLastModifiedDate"].Value = fileinfo.LastWriteTime;
Dts.Variables["User::VarFileLastAccessDate"].Value = fileinfo.LastAccessTime;
Dts.Variables["User::VarFileSize"].Value = fileinfo.Length;
Thanks,
Charmer
August 11, 2015 at 6:45 am
Charmer (8/11/2015)
Thank you Phil, you gave me an ideabut Just curious...Is there a way to get it on the GO?
Like we get the below informations....Just curious...through vb/c# coding?
FileInfo fileinfo;
fileinfo = new FileInfo(Dts.Variables["User::VarFileName"].Value.ToString());
Dts.Variables["User::VarFileCreationDate"].Value = fileinfo.CreationTime;
Dts.Variables["User::VarFileLastModifiedDate"].Value = fileinfo.LastWriteTime;
Dts.Variables["User::VarFileLastAccessDate"].Value = fileinfo.LastAccessTime;
Dts.Variables["User::VarFileSize"].Value = fileinfo.Length;
Don't think so. The documentation here backs that up.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
August 11, 2015 at 10:24 pm
Thank you Phil...It seems I need to get that in XML format and get the info as like as you said
Thanks,
Charmer
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply