Wildcard file path

Hi all,

i wish to read a single sheet from each files with path:-


20190715 is about yyyy,mm,dd
0820 is about time now
time now is the one i wish to wildcard, which no algorithm, or tracking part can be used to track it.

for example, in read file, with path “C:\Users\user\Documents\testenviroment\test_todayDate_*.xlsx”

to me, is failed with reason

any solution or suggestion?


Hi @damonyl,

you can not use wildcard in file path.
what is your requirement can you elabarate much more. So we can help


We can’t use wildcards in reading file.

Try this way.

    strExcelFiles [] = Directory.GetFiles("C:\Users\user\Documents\testenviroment\","test*.xlsx")

The above expression will read all matching files and will give output as string array. Then use For Each loop activity to read one by one file.


Hi @lakshman, so which activity should i run for this code? assign?


use Assign activity and create one variable of type string array and say strExcelFiles

1 Like

@lakshman will try this. By the way, i have update my post and more precise. please have a look

1 Like

@venkat4u, try check if you understand my post now. i have update the problem facing


My expression will work for you and just try once.


I’ve tried put it in assign, it turns up


It should be like this:

        Directory.GetFiles("R:\Phil\DB Specifications\", ReportName.Tostring+"_"+Now.Tostring("yyyyMMdd")+"_"+"*.xlsx")

@lakshman got it! thanks! so the comma will be before folder name. thanks again!

1 Like

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