What change do I need to make to have the flow only move the file with the exact name?
Daily three xlsx files are saved in a folder. I need one file to be archived. Flow moves the file and adds the date file name. The flow works for the file needed. However, the flow also moves the other two files. I cannot figure out how to get it to only move the one file. I assume it is because the file names all start with 4MEAL CSQ CSQ DAILY and 4MEAL CSQ AGENT DAILY. The third file which needs moved and is moving right is 4MEAL CSQ ACTIVITY DAILY. In the File parameter, I tried to use a fx expression and do file name equals 4MEAL CSQ ACTIVITY DAILY.xlsx which was based on solution posted saying to use this in fx to grab just one file. When I try variations of this in the fx, the flow fails.
Are you using the Move or rename a file action, or Move or rename a file using path? They both look identical to the flow author but if you click the 3 dots and go peek code, you can see the first one translates the selected source file to its drive ID, whereas the one with using path in the name does not.
If you use the first one, you can rename the file in the source and it'll still move it because the drive ID is what it's looking for, and the flow studio UI is just looking up and showing you its name. The latter, using path, will do that lookup at runtime so if you rename the file in the source the action will fail or if you replace the file with another using the same name it'll move that new file. I think that's the one you need to use in your case.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.