For each sub folder in a folder

Good Morning,
I have attached a sample folder, in that folder there is a folder called subfolder whcich contains other folders with PDF files and one excel file in each folder. My goal is to go through each folder and read the excel file and i will perform actions on each folder. i just need a workflow of how to go through each folder in the sub folder and reach the excel file in each one. Also you can see that each folder has number in the title i would also like to get the number from the folder name as a string to use later and cut out the MFRID part. Any suggestions or a workflow would be great.
test.zip (816.1 KB)

@NATHAN_MORA

  1. Use for eqch folder in folder activity…and give main folder
  2. Inside the loop use for each file in folder and use filter as "*.clsx"
  3. Inside the second loop you get the excel only and as it is only one you will get only one

Currentfile.fullname will give the fullpath…

Currentfolder.Name will give name we can use regex to get the number

System.Text.RegularExpressions.Regex(currentfolder.Name,"\d+").Value if you want to convert as integer then use cint(total previous function)

Hope this helps

Cheers

Cheers

Hi @NATHAN_MORA Please check the below workflow

SampleProcess.zip (819.2 KB)

Capture

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