Open files one after another in loop from two Different folders

Hi All,
Basically i have two different folders lets say student dump and input dump so i want to open input dump file from that open one file copy some data then open student dump folder files and paste some data which copied from input dump.so i know directory.filepath for single folder files open.but what about we want to open files from diffrent folders.anyone have idea please share.

Hi @Sayali_Rokade1

If you want to get files from a directory you can use Array_string_var=directory.getfiles(“your folder path”)

or
else if you want to directories from a directory you can use Array_string_var=directory.getdirectories(“Your folder path”)

Thanks
Robin

@Robinnavinraj_S so for multiple folders we used Array_string_var=directory.getdirectories(“Your folder path”) so in this scenario we need to take to different for each or for each inside for each that i did not understand exact steps

hi @Sayali_Rokade1

let us take a example for your case

as of my understanding your main folder has multiple folders so you want to loop the sub folders also right ??

In that case

Array_string_var=directory.getdirectories(“Your main folder path”)

use for each activity to iterate the Array_string_var

inside that for each

Array_string_var2=directory.getdirectories(“item.ToString”)// your for each iterative variable

and use another for each activity to iterate the subfolder (Array_string_var2)
inside the 2nd for each activity you can do what you want

Thanks
Robin

@Robinnavinraj_S thanks for help will try this scenario in my flow

okay

if you got your desired answer
kindly update us whether it resolved or not

Thanks
Robin

@Robinnavinraj_S
tried but it is not going in body loop .will share you screenshot

what is the issue your are facing right now?