cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SanjeevSoni
Frequent Visitor

Variable Name for the Filename

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

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4
fraenK
Memorable Member
Memorable Member

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

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

 

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

View solution in original post

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

 

thanks to t you😊

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,407)