How to find current directory

I have folder call “test” and test folder have “A” and “B” sub folder
I want to get separately and recently added files details
Please help me to achieve this

Fine
Hope this expression would help you resolve this
From A folder
Str_filepathA= Directory.GetFiles(“yourfolderpath” ,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).ToList(0)

Str_filepathB = Directory.GetFiles(“yourfolderpath” ,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).ToList(1)

Cheers @Mahesha_Mendis

1 Like

@Mahesha_Mendis,

This query will get you the directory and as well the file names in the last write time descending

Directory.GetFileSystemEntries(strFilePath).[Select](Function(x) New FileInfo(x)).OrderByDescending(Function(x) x.LastWriteTime)
1 Like

Not work
I have 2 separate folder in the same directory
Both of separate folders daily updating
And i want to get both of file update to separate spreadsheets
Can you explain how to achieve this

Test.xaml (11.6 KB)

Check this one, tested and working for me.

You need to change the main folder name and have to write the datatable output into the excel using Write Range Activity, Hope this help you.

Wow its work :innocent:
Thank you very much

1 Like

Please mark the solution as Solved if your issue has been resolved.

1 Like

In your Test.xaml returns only the file path instead of that
I wan to extract data from excel and display it
That want to happen in a loop when i stop the program
Help me

Main.xaml (44.6 KB)

1 Like

Test.xaml (12.1 KB)

i did the changes to get file content
but my problem is:,
i want to pass file content to separate user interface
then i need to get output separately
can you help me to achieve this problem

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.