How to move files from source to destination folder in Blueprism

0 votes
Mar 20, 2020 in RPA by anonymous
• 160 points
3,166 views

1 answer to this question.

0 votes

Try this approach. It creates a new folder in the destination with the same name as the source folder, copies its contents, and deletes the source folder (essentially the same thing as moving it). The inputs remain Folder_Path and Destination.

Success = True
Message = "" 

Try
    If Not Folder_Path.EndsWith("\") Then
        Folder_Path &= "\"
    End If

    Dim newDirectory As String = System.IO.Path.Combine(Destination, Path.GetFileName(Path.GetDirectoryName(Folder_Path)))
    If Not (Directory.Exists(newDirectory)) Then
        Directory.CreateDirectory(newDirectory)
    End If
    Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(Folder_Path, newDirectory)
    System.IO.Directory.Delete(Folder_Path, True)

Catch e As Exception
    Success = False
    Message = e.Message
End Try

Ensure that you include the System.IO namespace in the Code Options of your object. The Code Options can be found by double-clicking the description box on the Initialize Page/Action and choosing the appropriate tab.

answered Mar 20, 2020 by liana
I'm new to Blue Prism...I've tried your approach but its showing me some errors can u kindly give me more details about the code stage part and also where to include that code that you've mentioned, Is it in the code stage?

Yes, and also could you post the errors that you are getting? It will be easier to comprehend the query.

Related Questions In RPA

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,365 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
1,946 views
0 votes
1 answer

Want to automate in Linux server to move the files whenever data is dump in source location to another server uisng UIpath

Check this out https://www.uipath.com/kb-articles/automating-t ...READ MORE

answered Aug 10, 2020 in RPA by Karan
• 19,610 points
897 views
0 votes
2 answers

How to configure outlook automation in Blueprism

Mapiex works only with 32bit outlook client ...READ MORE

answered Dec 7, 2018 in RPA by Nitesh
13,598 views
0 votes
1 answer

What is code segment in Blueprism and how to implement it?

Blue Prism - Code Stage The code stage ...READ MORE

answered Sep 28, 2018 in RPA by Priyaj
• 58,090 points
5,257 views
0 votes
2 answers

How to resolve busy resource in BluePrism to run a process in the control room?

Did you manage to resolve this problem ...READ MORE

answered Jul 3, 2019 in RPA by Tim
3,994 views
0 votes
1 answer

RPA : How to extract specific data from scanned pdf and write into excel in blueprism?

Your query is similar to https://www.edureka.co/community/6509 ...READ MORE

answered Mar 23, 2020 in RPA by Sirajul
• 59,230 points
1,975 views
+2 votes
1 answer

UIPath - Extract Table data from PDF Image

There are mainly two options that UiPath, ...READ MORE

answered Mar 20, 2020 in RPA by anonymous
• 59,230 points
5,624 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