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 6, 2019 in RPA by Ranjan
15,371 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 8, 2019 by Abha
• 28,140 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, 2019 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 14, 2019 in RPA by Anvi
• 14,150 points
10,102 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, 2019 in RPA by Abha
• 28,140 points
2,503 views
0 votes
1 answer

How to get values from database and write into another database using uipath?

Check the following thread to connect to ...READ MORE

answered Dec 19, 2019 in RPA by Sirajul
• 59,230 points
2,291 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, 2019 in RPA by Anvi
• 14,150 points
7,740 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
1,618 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
2,759 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
1,822 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
1,504 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, 2019 in RPA by Abha
• 28,140 points
1,261 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 8, 2019 in RPA by Abha
• 28,140 points
5,810 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP