Get Last Modified Time of a file in a folder into a DateTime variable

I’m looping through every file in a folder with a For Each activity to perform some actions on each file. And I’ve done that step.

Then I want to get the Date Modified feature of each file within the For Each, and pass that into a DateTime variable.

I saw something might be similar in the following link but I still don’t know how to pass Date Modified of a file into a variable.

Please advice how to use function(file) …and store that in a variable

assign DateTime modification = IO.File.GetLastWriteTime(“C:\test.txt”)

Change “C:\test.txt” to your filepath from for each


@SybilWang check attached zip file

ReadFiles - (393.0 KB)


@indra Awesome!

1 Like