How can i take only the files of today in a ForeEachFile Activity loop

Hello everyone
I want just to take the names of the files of today but when I apply foreach file it generates all the files
Please help :pray: :worried:

1 Like

@Imene_ZARAI

1 Like

Could you please explain more
I make this filter into the loop or outside

After this do not use for each file from folder activity.instead use for each activity to loop through the files which was already got filtered by using this code


I guess the expression is wrong

Hi @Imene_ZARAI

You can if activity inside the For each file in folder activity

Use this condition New System.IO.FileInfo(CurrentFile.ToString).CreationTime.ToString("dd.MM.yyyy") = DateTime.Now.ToString("dd.MM.yyyy")

Can you check out the XAML file

TodaysFileINFolder.xaml (7.7 KB)

image

Regards
Gokul

1 Like

It worked thank you
Could you tell me how can I get the name of the current file without expression please

HI @Imene_ZARAI

Just try this

Path.GetFileNameWithoutExtension(CurrentFile.ToString)
Path.GetFileName(CurrentFile.ToString)

Regards
gokul

Hi @Imene_ZARAI

Can you create the New topic for this query. Kindly close this topic by mark as solved

It will help for other too.

Regards
Gokul

1 Like

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