Files List

Hi,

I am having a folder A which contains list of Excel files (10 files) then folder B which contains list of PDF files (10 files). I want to get the count of each folder file list separately and if needed I want to process the each exam file 1 by 1, how can i achieve it, is there any activities like file lister?

1 Like

Hi
like this in WRITELINE activity
for excel
Directory.GetFiles(“yourfolderpath1”,"*.xlsx").count.ToString
for pdf
Directory.GetFiles(“yourfolderpath1”,"*.pdf").count.ToString

and to process tthem one by one
–use a assign activity like this
arr_excelfiles = Directory.GetFiles(“yourfolderpath1”,"*.xlsx")

–use another assign activity like this
arr_pdffiles = Directory.GetFiles(“yourfolderpath1”,"*.pdf")

where both arr_excelfiles and arr_pdffiles are type array of string

–now use FOR EACH activity and pass the above array variable as input and change the type argument as string in the property panel of for each activity
and inside that we can access te files by mentioning item.tostring as input file path
if its arr_excelfiles (in excel application scope activity) or if its arr_pdffiles (in READ PDF or READ PDF OCR activity)

hope this would help you
kindly try this and let know for any queries or clarification @monish06
Cheers

I think is this what you need. (This assumes your folders are on the desktop, but change the arguments to point to the folders)

Main.xaml (6.8 KB)

Perfect thank you.

1 Like

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