How to get the system information from our file ?- FileInfo and FileInfoSystem

Hello everybody,

I allow myself to open this topic because I do not find how to retrieve system information from a file. I know how to get the path of it. I know how to get his extension. But I would like if possible to get the information - system of it. Namely that size - that creation date - that modification date - that last access date - and the owner of this file.

I looked at the .net documentation.

I found this:

Maybe I do not understand how to transcribe the lines of code in UIPATH directly.

I tried this:

I assign a variable ā€œlistFilesā€ = System.IO.Directory.GetFiles (ā€œreportsā€)
listFiles → String

It’s good.
Capture1

infoMe = new fileinfo(item.ToString)
Capture2

My Wrile line is good → infoMe.ToString

But if I try this it does not work:

assign → fileMe = System.IO.FileSystemInfo(item.ToString)
fileMe → Type = FileSystemInfo

It does not work

Maybe I do not understand what I’m doing.

Thank you for help.

If I’m not very clear thank you for telling me.
I come from the PHP world and I’m not yet developed with .net and Vba

Bye

2 Likes
infoMe.Length
infoMe.CreationTime
infoMe.LastWriteTime
infoMe.LastAccessTime
System.IO.File.GetAccessControl(**FilePath**).GetOwner(GetType(System.Security.Principal.NTAccount)).ToString()
7 Likes

Thank you very much for your quick response. I’m testing it right away.