Use Directory.GetFiles and value?

I want to use Directory.GetFiles for get path file.
But I have value date as string = System.datetime.now.tostring(“dd.MM.yyyy”)

How to use value date in Directory.GetFiles?

image

Directory.GetFiles("C:\Users\Maria\input\03.09.2021\","*.xlsx")

Please guide me about it.

1 Like

Hi
Like this if the date as string is in a variable named string_input

Directory.GetFiles(“C:\Users\Maria\input\”+string_variable+“\”, ”*.xlsx")

1 Like
Directory.GetFiles("C:\Users\Maria\input\"+now.tostring("dd.MM.yyyy")+"\","*.xlsx")
2 Likes