Move files to a destination folder in Power automate
While doing automation we will have so many input files which we need to move files to a destination folder after processing.
This could be a very important step during the designing phase of any process automation because those files can create some confusion if not moved to another folder after processing.
In this article, we will see how we can move files to a destination folder using power automate desktop.
Let’s get into the practical implementation of this task:
There are two different scenarios here, they are mentioned below:
- Moving a single file
- Moving multiple files in a folder
First let’s see how to move a single file to a destination folder:
Step1: Drag and Drop move files action from actions panel to flow designer panel as shown below:
Let’s see the required parameters for move files action:
- File(s) to move – Provide the full file path that needs to be moved to a new folder.
- Destination folder – Provide the full path of the destination folder where we want the files to be moved.
- If file exists – There are two different options here.
- Do nothing – If the files already exist in that folder then you don’t see any changes in them.
- Overwrite – If the files already exist in that folder it will overwrite them.
- Variables produced – It will produce a variable that holds a list of file paths that are moved to a destination folder.
Now the below image shows all the parameters that required to that action:
Here you can also select overwrite option for if file exists parameter.
Now let’s see for moving multiple files from a folder to a destination folder.
Step1: Drag and Drop Get files in folder action from actions panel to flow designer panel as shown below:
Here it will give us the list of files in that folder.
Let’s see the required parameters for get files in folder action:
- Folder – Provide the full path of the folder where it moves all the files in that folder.
- File filter – If you want to get specific types of files from that folder then a filter can be given here. (eg: If we want only text files to be moved then use like this *.txt or if you want multiple files to be included then use as this *.txt;*.jpg)
- Files – This is the output which is a list that holds all the file paths.
Step2: Drag and Drop the move files action from actions panel to flow designer panel as shown below:
We already discussed about all the required parameters for this action.
Instead of providing the file path just pass the list of files variable as shown in the above image.