web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Suggested Answer

Power Automate Desktop move files based on Excel list

(0) ShareShare
ReportReport
Posted on by 2
I have been working on a way to automate a task but I need some help since I am having issues with the flow.

I have a folder with over 200K attachments and I am trying to move the files into different folders based on an Excel file.  Due to the quantity of files my thoughts are to do each movement of files as a separate flow.

The steps I am doing are:
 
  1. Launch Excel
Variable Produced = ExcelInstance
  1. Read from Excel worksheet.
Retrieve = Values from a range of cells
Start Column = A
Start row = 2
End Column = A
End row = 46552
Variable Produced = ExcelData
In Flow Variables the File Names of all files are listed
  1. Get files in Folder
File Filter = *.pdf
Variable Produced = FilesList
In Flow Variables the full File Path of all files are listed
  1. For each CurrentItem in FilesList
Value to iterate = %FilesList%
Variable Produced = CurrentItem
In Flow Variables only the 1 item is listed.  The flow did go iterate through the For each loop.
 
5. If CurrentItem in FilesList then
First operand = %CurrentItem%
Operator = Equal to
Second operand = %ExcelData%
 
6. Move Files
File(s) to move:  %FilesList%
If file exists = Do nothing
Variable Produced = Moved Files
In Flow Variables it is blank. 
 
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,522 Super User 2026 Season 1 on at
    Can you specify what exactly are the issues with the flow? Where do you need help?

    The step 5 might be set up incorrectly:
    5. If CurrentItem in FilesList then
    First operand = %CurrentItem%
    Operator = Equal to
    Second operand = %ExcelData%

    You are checking if currently iterated loop item so one row is the same as the full ExcelData -table. That will never be true.
    You should instead check if %ExcelData% contains the %CurrentItem% filename. So if you excel has the filenames listed without extension then fix it like this:
    First operand = %ExcelData%
    Operator = Contains
    Second operand = %CurrentItem.NameWithoutExtension%

    Or if it has the filenames contain the extenstion (.pdf) then use %CurrentItem.Name%



    So the full flow should look something like this:


    And the excel would look like this but obviously larger and different names for the files:


    How the folder structure looked like in my dummy flow:

    Example of Folder1:

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard