Loop through files in folder uisng reframework

how to build the logic in re-framework without orchestrator queue, where there will be currentdate folder inside the currentdate folder there will be case ref subfolders and inside the case ref subfolder there will be documents those documents need to process one by one, for all the case ref subfolders.

1 Like

I would probably structure it something like this:

Dispatcher part in init.

  • Create a list of string with filepaths to all the files u want to process

Process Part
Process will work with in_transactionNumber in ur List of paths

  • Transaction item will be path of the document:
    allDoucmentList(in_transactionNumber)

Hi @Rupak_Banik
Welcome to the community!

Here is how you can achieve this without queue item.

  1. Create a List Variable name MainFolderPath inside which all your case folders are there.

  2. Under Initialization state use a for each folder in folder activity to iterate through all your case folders PFB the Screenshot

  3. Now Under the get Transaction state use a if condition with in_TransactionNumber< in_ListOfFolderPath.Count inside the then block assign the case folder path with the index as below:

  4. Now in the process state use a for each to iterate in the current case folder using Directory.GetFiles(TransationField1) to retrieve all the Documents present in each transaction Path.

Let me know if this solves your Problem statement.

Cheers :wink:
Bishwajeet Kumar

2 Likes

Thank you for the detail explanation.

1 Like

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