How to move files from source to destination folder in Blueprism?

0 votes
Mar 19 in RPA by anonymous
• 160 points
713 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 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 7, 2019 in RPA by Abha
• 27,930 points
2,475 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
• 27,930 points
427 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 in RPA by Karan
• 16,330 points
127 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
10,072 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
• 57,660 points
3,126 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 2, 2019 in RPA by Tim
1,878 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 in RPA by Sirajul
• 57,940 points
525 views
+2 votes
1 answer

UIPath - Extract Table data from PDF Image

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

answered Mar 20 in RPA by anonymous
• 57,940 points
1,579 views