Moving Files from one folder to another using UiPath

0 votes
I want to move all the files from one folder to another. Can anyone suggest how can I achieve this using UiPath?
Mar 5 in RPA by Ranjan
1,625 views

2 answers to this question.

+1 vote

Hi Ranjan, to move files from one folder to another using UiPath, follow the below mentioned steps one by one:

1. Create a Sequence and create the variables FilesCount and Path. Now assign the value of Path to the Path of your Source Directory.

2. Now add an Assign activity and assign the FilesCount to directory.GetFiles(Path). This will fetch all the files from the source path.

3. Then drag a For Each activity and write item FilesCOunt in "ForEach" & "in" textfields respectively. Also, go to the Properties of For Each activity and mention String in the Type Argument.

4. Finally in the Body section of ForEach activity, add Move File activity and mention the Destination Path in the Destination section of Properties of Move File activity. Also, in the properties tab, go to From section and set item as Path.

5. Now, just run the program and you will see that all your files are moved from one folder to another.

answered Mar 7 by Abha
• 23,030 points

as I experienced, in  Move File activity Path of From section have to be string. So "item.ToString" have to be used.

+1 vote

if you want to copy and move whole folder along with files at a time then you can use invoke method activity:

1. invoke method activity

In target type : Microsoft.visualBasic.FileIO.Filesystem 

Traget Object  : NA (as the method is static method)

Method Name : CopyDirectory

Now in Parameter Property :  three arguments u should have passed : 

string : source path

sting: destination path

Boolean : true

with the help of this you can move all the files along with the folder in destination path.

answered May 29 by Venkat
• 320 points
@Venkat, your approach is right but it will copy the complete folder to the destination, while as asked in the question, the task here is to move files from one folder to another.

Related Questions In RPA

0 votes
1 answer

How to extract specific type of files from a directory using UiPath?

Hey @Avani, if you want to extract ...READ MORE

answered Mar 13 in RPA by Anvi
• 12,860 points
1,804 views
0 votes
1 answer

How to move folders containing Json and Images files to another folder in uipath?

Hey Akshay, you can check this thread ...READ MORE

answered Jun 3 in RPA by Abha
• 23,030 points
84 views
+1 vote
2 answers

Looping through PDF files to extract specific data using Uipath

Hi Rashi, you can access all the ...READ MORE

answered Mar 5 in RPA by Anvi
• 12,860 points
1,398 views
+3 votes
1 answer

How to extract data from a website and save it to excel using UiPath?

Hi Piyush, if you want to extract ...READ MORE

answered Mar 8 in RPA by Anvi
• 12,860 points
3,850 views
0 votes
1 answer

Automation in Uipath

you can use the Database package for connecting  ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
321 views
0 votes
1 answer

UiPath vs Workfusion

in WorkFusion, you can create a script ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
1,021 views
0 votes
1 answer

Surface automation in rpa?

Surface automation is a visual automation that is done using ...READ MORE

answered Apr 20, 2018 in RPA by wrecker
• 3,110 points
458 views
0 votes
1 answer

Private Chrome window open UiPath

To open the browser in private mode, ...READ MORE

answered Apr 25, 2018 in RPA by wrecker
• 3,110 points
387 views
0 votes
1 answer

Moving files from one folder to multiple folders using UIPath

By "we need to distribute the files ...READ MORE

answered Jun 3 in RPA by Abha
• 23,030 points
87 views
0 votes
1 answer

How to move all files from Source to Destination Folder in UiPath?

Hi Pragati, in order to move files ...READ MORE

answered Mar 7 in RPA by Abha
• 23,030 points
722 views