How to get file information(modified by, modified date and time)

Is there an activity i can use to get the name of the person who modified a file and the time they modified it? I tried googling and i saw there was as get file info, but it doesnt seem to exist in my activity list.

@nicholas.harvey - Please check this post…


You can assign this System.IO.File.GetAccessControl(path).GetOwner(GetType(System.Security.Principal.NTAccount)).Value
to String variable to get owner, where ‘path’ is path to file as String.

To get some info about the file, you can init FileInfo var
new FileInfo(path)
Then get the ‘CreatedDate’, last access date etc.

@artshoque - Owner is different from Author right??? So whatever the file you give it will always gives the owner name of your system.

So, you need not the owner of the file, but author.
And as I see, only files created by Microsoft Office have this info.

I think that the Windows doesn’t keep the last modified user. And you need to create separate sequences to get this information from Word, Excel, etc files.
Check this link: How to get and insert the last modified user name in Excel?

So, for the Excel files you can use VBA