How to move selected files from folder

i have folder in which i have some files e.g A.xls,B.xls,C.xls,D.xls and i want to move only selected files e.g B and D how should i do it in move files activity?
i tried filter of .xls. but it moving all files…please help

Hi @Hemant_Deshmukh

Place an if condition in the for each file in folder and give the condition as

CurrenFile.ToString.Contains("B") OR CurrenFile.ToString.Contains("D")

And in the IF condition activity place the move file activity and give the CurrentFile.Tostring in from and give the final path in the To Field

Please check the below WorkFLow for the better understanding

Hope it helps

Hi @Hemant_Deshmukh

→ Use the For each file in folder activity to iterate the each file in the folder.
→ Inside for each insert if activity to check the condition.

- Condition -> CurrentItem.Name.toString.equals("B") or CurrentItem.Name.toString.equals("D")

→ Inside if insert the move file activity to move the file from source folder to destination folder.

Hope it helps!!

1 Like

Hi @Hemant_Deshmukh,

Thanks for reaching out UiPath Community.

You can follow the below steps.

  1. Filter By "*.xls
  2. Then add a condition for the Filter with the specific name of the File.
  3. Use the Move File activity.

Hope this works for you.

Happy Automation,

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