Hello!
I am trying to accomplish the following and i'm sure the answer is out there but i'm hoping you guys can help me.
I have a flow that is creating a file in a document library, what i need is to know if there is a duplicate file in that library (there is a metadata field called 'Standard_Name' that would be the same or just the file name being the same. If the file name is the same, it won't overwrite, the flow just fails.
I was just going to have it append the date to the filename so it at least creates the file in the library BUT i still need to find that 'old' document and move it to a archive folder.
How to i find or compare the new file created in the library to all the other files 'Standard Name' field(would be the best way) and then move the old one to a new library. The 'compare' part is where i'm stuck at.
Let me know if you need more information.
Thank you!!!!!
Solved! Go to Solution.
Hi @Km00 :
I suggest you add this step before creating the file:
1\Get all files in the target file directory (Not Include Nested Items)
2\ Traverse these files, find the file with the same name, and copy the file with the same name to the OLD folder
3\Delete files that have been copied
4\Create the files you need to create into the target directory
This will ensure that the file you create will not have the same name problem.For example:
The function of these steps is to find the file with the specified name and move the file. After the file with the same name is moved, you can add new files.
In addition,this forum is the Power Apps forum, if you need more help with flow, I suggest you go to the Power Automate forum for help.
Best Regards,
Bof
Hi @Km00 :
I suggest you add this step before creating the file:
1\Get all files in the target file directory (Not Include Nested Items)
2\ Traverse these files, find the file with the same name, and copy the file with the same name to the OLD folder
3\Delete files that have been copied
4\Create the files you need to create into the target directory
This will ensure that the file you create will not have the same name problem.For example:
The function of these steps is to find the file with the specified name and move the file. After the file with the same name is moved, you can add new files.
In addition,this forum is the Power Apps forum, if you need more help with flow, I suggest you go to the Power Automate forum for help.
Best Regards,
Bof
User | Count |
---|---|
196 | |
125 | |
86 | |
49 | |
42 |
User | Count |
---|---|
284 | |
159 | |
138 | |
75 | |
72 |