How to move existing folder to a folder that needs to be created in UIPATH

I started my work with this folder (lets call this invoices), now that Ive done the things I need to do and all, Now i want to create a folder which Ive yet to create called (Invoices completed) how do i create and move the content of folder 1 into folder 2?

Hi @meli

You can use For Each File in Folder and Move File Activity to achieve this

For example

Hello! i seems to have a problem where it says file format is not supported for the words inside double quotes, ill need to change that to the name I want right?

Could share some screenshot of your workflow and the issue ?


In To Field change to

"Processed Invoice\"+CurrentFile.Name

CurrentFile.FullName is the full path of the file and extension

CurrentFile.Name is the name of the file and extension

Cheers


Now this is my new error :frowning:

Hi

It is because the folder path you provide was not found

The way you pass the destination path (TO field) the folder Processed Invoice need to be within project folder like this

image

If you want, you can pass the full path instead relative path in To Field, for example:

"C:\Users\my_windows_user\Downloads\Processed Invoice\"+CurrentFile.Name
1 Like

@meli

First use a create folder activity with "Processed Invoice"

And then use the for loop you are usinng

Cheers

Have you tried “Create folder”, “Move file”
regards,

May i ask how can i do this

how do i use a loop?

where do i put that?

@meli

Loop you are already using right

  1. Create folder with the folder you need "Processed Invoice"
  2. For each file in folder where the file is presnet
  3. Move file inside it with currentfile.FullName and the trget folder

Cheers

@meli

Hi

For the solution propose, I assumed you already create a folder to move the processed invoice to it. You can create either manually and pass the full path of the folder as mentioned before or you can create dinamically within your workflow using Create Folder Activity

Cheers

I am supposed to create the folder inside UiPath, i am not allowed to created it manually:(

Follow it
regards.

Alright

you can do it easily

Before “For each file in Folder” activity

Add Create Folder Activity

image

Add a variable in Output (you can do it using ctrl + k hotkey after click in it)

Now, in To field, change the expression for this one

ProcessedInvoiceFolder.LocalPath+"\"+CurrentFile.Name

Why does my properties not have a outlook function