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 / Variable Name for the ...
Power Automate
Answered

Variable Name for the Filename

(0) ShareShare
ReportReport
Posted on by 28

I am reading a Excel file, I have the Filename. I would like to copy that file to another location.

But When I use the filename and folder, it is giving the error message

SanjeevSoni_0-1618389557891.png

 

SanjeevSoni_1-1618389605074.png

 

The following is the action I am doing

 

SanjeevSoni_2-1618389657390.png

 

 

 

 

I have the same question (0)
  • fraenK Profile Picture
    2,125 on at

    You'll need to verify that the content of your variables are matching the argument specification:

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/file#copy

    Sometimes you need to use trim to remove line breaks from Excel cell output:

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/text#trim

     

    File(s) to copy

    List of Files The file(s) to copy. This can be a file path, or a variable containing a file, a list of files, a text path, or a list of text paths. Use the 'Get files in folder' action to populate a variable with a list of files

     

    Destination folder

    Folder The destination folder for the copied files

  • SanjeevSoni Profile Picture
    28 on at

    Thanks for the super fast reply.

     

    the Value in Cell (2,2) and Cell (2,3) is as below and I tried Display Message it is showing the correct value, But I am still getting the error message as shown in my original message

     

    SanjeevSoni_0-1618392585039.png

     

  • Verified answer
    fraenK Profile Picture
    2,125 on at

    Did you try trim? Check the content in the variable pane within PAD when executing in edit mode

  • SanjeevSoni Profile Picture
    28 on at

    Great !!  I have been struggling for 2.5 Hr, and trim worked great !! and you responded in 25 seconds,   

     

    thanks to t you😊

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard