How to check if file in folder contains specific name from excel sheet

Hi all,

currently I have a column (ID) in an Excel sheet which shows me the Key ID of a PDF invoice. I search up the values in this column (ID) in a website to check its validity. If its valid, I want to update another column (PDF Status) which is already present in the excel sheet. I want to also move the pdf file that contains this Key ID in its filename.

The PDF’s filename contains the Key ID and other values, thus I have to use Key ID to identify the PDFs before moving them into another folder. Same thing goes if the PDF invoice is invalid. If invalid, the process should move the PDF file containing the same Key ID that was just searched up and move it to another folder.

How can I do this?

  1. Store your KeyID in a string variable(say KeyID)
  2. Now create an array of strings(say Files) and assign as below:
  3. Now in the for each , you can use if condition to check if your pdf contains KeyID. See below: