Looping specific files in a folder

I want to process only specific files in a folder by looping the files. The specific files are
“C:\Users\seema.jethe\Downloads\Test\PAN_3456pdf”, “C:\Users\seema.jethe\Downloads\Test\CHEQUE_2345.pdf”, “C:\Users\seema.jethe\Downloads\Test\GST_1234.pdf”
and i am storing “C:\Users\seema.jethe\Downloads\Test” in one variable. Can anyone help me with this?
Below are the screenshots
image
image

Hi @Seema_Jethe

Check out this post :slight_smile:

Try inserting this into an Assign activity where:
Left Assign:
Array of String variable (String[ ])

Right Assign:
“Directory.GetFiles(“C:\Users\seema.jethe\Downloads\Test”, “.pdf”)”

It will give you a collection of all PDF files in that folder location.

Does this help you?

Hi @Seema_Jethe

Is this what you are expecting?

image

Thank you.

@Jobin_Joy yes i am expecting the same but i need regex for the ss shown below
image

start with following:
grafik

(PAN|CHEQUE|GST).*.pdf$

For further help:

Hi @Seema_Jethe

You can try with this alternative

  • for each file in the folder and inside you can give the condition like
    • if the folder path contains PAN or CHeque or GST

Regards
Sudharsan

1 Like