How to search name of file into folder which is variable

Can anyone please tell me how i search PDF file name into the folder …where pdf file name is- “TA charged dated Oct 2021 99009758” every time month name(current month i.e Oct 2021) and invoice no(99009758) will be change…


Welcome to our UiPath community.

Please try below expression.

   FileName = Directory.GetFiles("FolderPath","TA*.pdf")(0)

The above expression will give you required file from specified folder.


Welcome to uipath forum

Use a assign activity like this to get the last saved file with your new file name as expected in the folder

Cheers @rutuja.y

1 Like

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