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()
6 Likes

Thank you very much for your quick response. Iā€™m testing it right away.