Move file from source to destination respective of filename

yes but name of file will vary…

@kjaiswal

Assign activity: FileArr=Directory.GetFiles(“Folderpath”). FileArr should be a string array variable

For each activIty: for each item in FileArr
Move file activity: Give source as the item and destination as your new folder

1 Like

Follow the below steps:-

  1. Create a variable named Folderpath - Type of the Variable is string
  2. Take one assign activity pass the Folderpath= "C\Users "

Note:- \ is mandatory. Mention this in end.

  1. Create one more variable named Arr_File- Type of variable is Arr(String).
    To change the variable type click on the string you can see Array click that T and change it to String.

  2. Take one assign activity Arr_File= Directory.GetFiles(Folderpath,“*.xlsx”)

5.Take one for each pass the Arr_File
Take one Move file activity

Source mention Item
Destination Pass the Entire Folderpath.

Regards,
NaNi

1 Like



I am getting this error…

I missed the double quotation marks.

Please change it to Directory.GetFiles(Folderpath,“*.xlsx”)

Regards,
NaNi

Yes, it worked Thankyou So much @THIRU_NANI

1 Like

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