Multiple "for each folder" activity

Hi Team,

can I use for each folder inside for each folder and inside of them for each file in folder?

as I need the BOT to enter all the files (folder1) then get into a specific folder inside of them all with the name (Subfolder) then enter another one (ID folder) and copy some photos as the screen below

yes you can, use for each inside the directory with your folders and use for each folder inside of each folder do your thing

@omar_ismail

Yes you can use like that…also if you are looking at looping all files inside a folder and sub folder inside them then you can directly use include sub folders option also

cheers

but in the second for each folder the Subfolder will be in a different place it will be located on the first folder so how can I solve this?

but in the second for each folder the Subfolder will be in a different place it will be located on the first folder so how can I solve this?
.

you can enable the flag “subfolder” doesnt matter if the folder is in a different place, if it is in the parent folder will work

@omar_ismail

The sub folder is present in the main folder then it would be taken automatically

cheers

so you mean even if the second for each folder dosn’t have the new path for the secon folder it will work also?
as the run from this activity is disabled if you know why?

@omar_ismail

You will give currentfolder.fullname from
The first for loop in the second…as in put…

Ideally if you want to check each folder then you dont need multipel also…you can just use include sub folders

Both would work for you

Cheers

i am sorry but I didn’t get it let’s present it as real
i have a folder containing the following folder called (account 1, account 2, and Account 3) inside them I have two folders one of them called IDs inside this one i have some pic i need to copy.
so how can i do this
i am sorry for bothering you

@omar_ismail

Use for each fiel in folder activity and click on include sub folders options…it will read the files which are inaide tour second sub folder also directly and if you want only pictures use the filter option to give the picture related extensions only

And inside the for each file in folder use currentfile.fullname to get the location…

Just use a log mesaage to understand how it works and gets the files inside the aub folders also when you use include sub folders option

Cheers

Don’t use multiple For Each Folder. Just use one, and check the “include subfolders” checkbox.

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