Issue with iterating through Folder

Hello Everybody,

i am new to UiPath and i am doing an automation where UiPath iterates through a folder with Excel Files and for each Excel he is copying data and writes it into SAP. After that the robot moves the excel to another folder and takes the next excel. Everything is working fine but if there are more than 1 row to iterate through than the robot uses the excel which is already moved to another folder. I don’t know how to fix this problem and how he can use an excel in a folder which is not there (already moved). Any ideas?


I don’t know the exact scenario but please have a try…

Keep a counter to get the count of rows in excel , once count of rows are over then move the file to other folder and rest as you are doing…
To get row count of excel:
1.Excel application scope
2. Read range --> let output be DT
3. DT.row.count.tostring

Hope that works …


Step 1: First i am iterating through the folder like the first pic

Step2: After that the robot does some “if-checks” and then he iterates through each row. (If it is only one row then it works fine)

Step 3: At the end i kill the excel process und move the folder UiPath4

I dont know why he is using the same excel again if he iterates through more than one row in Step 2. He moves the file but is also using the file again even the file is not in the folder any more. When i quit the process the file is actually moved…

Sorry for sending multiple messages… I can’t put all images in one message because i am a new user