How to move Files from one folder to another?

Hi,

I am trying to move few files from a folder to another. I could not use Move Files option successfully. It asks for File name in the From field (but the properties panel shows it as path). When it is run, it considers the path as File and throws an error saying 'Could not File file “”.

Below are relevant screenshots.

image

Please assist.

Thanks in advance,
Manjari

You need the name of the file as well. For example “E:\UiPath\FileTransfer7\Source\MyFile.xlsx”.

Hi, welcome to the community!
The From needs to have the full file path and the To, can have either a folder path or a full file path if you want to also rename the file.

Thank you for the response. But then I am trying to move a set of files irrespective of the extension and the file name is not fixed. Can you assist how to refeer to set of files instead of a fixed single file from the source path.

Thanks again!

Only one file at a time, in your case seems like you have the wrong parameter, use item in the From instead of Source.

Set a variable to Directory.GetFiles("E:\UiPath\FileTransfer7\Source"). This will be a String array type. The use a For Each activity to iterate over each string (Item), and move Item where you need it to be moved.

1 Like

Thank you @Anthony_Humphries & @bcorrea. I could move the files now. :+1:

1 Like