I am trying to use FLOW to automate copying files from one folder (say "Current") to another folder(say "Archive") within the same library. But it doesn't seem to work. Do I need to use some dynamic formulas here?
Please advice.
Solved! Go to Solution.
Hi @ Yudistara,
Do you want to create a flow to copy the file in folder "Current" to folder "Archive" within the same library once a week?
If you would like to use the "Copy file" action if sharepoint connector to achieve your needs, you should fill in the file path in the "Source file path" field and "Destination file path" field of "Copy file" action instead of the folder path.
Please take a try use the "Create file"action to achieve your needs,and refer to screenshot below to create the flow to achieve your needs:
The expression in the "File Identifier" field of "Get file content" action as below:
The flow would run successfully to copy all files from folder "Current" to folder "Archive" as screenshot below:
Regards,
Alice Zhang
OK. I figured it out. Thought i need to share it if someone is looking for the solution.
All I had to do was get the files, set up a condition if the "folder path" contains the name of the folder in which the file needs to be deleted from. (See below screenshot) and then delete the file.
Hi @ Yudistara,
Do you want to create a flow to copy the file in folder "Current" to folder "Archive" within the same library once a week?
If you would like to use the "Copy file" action if sharepoint connector to achieve your needs, you should fill in the file path in the "Source file path" field and "Destination file path" field of "Copy file" action instead of the folder path.
Please take a try use the "Create file"action to achieve your needs,and refer to screenshot below to create the flow to achieve your needs:
The expression in the "File Identifier" field of "Get file content" action as below:
The flow would run successfully to copy all files from folder "Current" to folder "Archive" as screenshot below:
Regards,
Alice Zhang
Thank you @v-yuazh-msft. It worked perfectly with your instructions. Thanks a lot again.
But now I am trying to figure out how I can delete the file from "Current" folder in our example. Meaning, once the file is copied to Archive folder, the file needs to be deleted from "Current" folder.
I tried using the "Delete file" action, but not successful. Delete file action also deletes the file from both the folders. I only want to delete the file from the Current folder, but not the Archive folder. Any suggestions are appreciated.
Thanks.
OK. I figured it out. Thought i need to share it if someone is looking for the solution.
All I had to do was get the files, set up a condition if the "folder path" contains the name of the folder in which the file needs to be deleted from. (See below screenshot) and then delete the file.
Very useful!
Would it be possible to edit the name of the file by adding today’s date at the end of the file name in the destination file path? I imagine it’d be in the Create File step, but what would the expression be?
Expression will be something like this
concat(split(filename,'.')[0],utcnow('dd/MM/yyyy'),split(filename,'.')[1])
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
15 | |
14 | |
7 | |
6 | |
5 |
User | Count |
---|---|
24 | |
18 | |
10 | |
8 | |
6 |