Move file activity dynamic names

he file name that I need to move is not static. It changes daily. How do I specify a wild card in the file name using the “Path” field in the “Move File” activity?

how to use wild card

@corncookie, how about instead of using a wild card, every day the bot runs, it first gets the path to the file you can use Directory.GetFiles and save that in a variable and then set that variable inside the move path activity.

1 Like

Thanks for the reply. But I am kind of confused can you explain it.
how can i assign the path.

@corncookie, maybe that could be unnecessary, you do not have to read the path. i guess this is what you initially asked for

“C:\myfolder\subfolder”,"*.pdf"

1 Like

You may get inspired by “For Each File in Folder” snippet

image

Cheers

2 Likes

Thank you for the reply

thanks for the reply. i figured to do it

i used this by assigning varpdffiles = Directory.GetFiles("\Mac\Home\Downloads").orderbydescending(Function(d) new fileinfo(d).CreationTime).ToList(0)

And you could also use searchPattern, e.g.
varpdffiles = Directory.GetFiles("\Mac\Home\Downloads","*.pdf")…

Cheers