Hello everyone,
I am using Power Automate Desktop to try to rename files based on data from excel and here is my excel table.
NameExtensionDate accessedDate modifiedDate createdFolder PathFinal Name
Croco Child.jpg | .jpg | 02-07-2022 17:38:34 | 29-07-2015 20:31:20 | 02-07-2022 17:38:34 | C:\Users\win\Desktop\Photos\ | Crocodile_29-07-2015 20:31:20 |
Midway Horse.jpg | .jpg | 02-07-2022 17:38:34 | 24-02-2014 01:35:53 | 02-07-2022 17:38:34 | C:\Users\win\Desktop\Photos\ | Horse_24-02-2014 01:35:53 |
The first column(Name) is the current file name and the last column name (Final Name) is the name that I want to give to the files.
For some reason the flow is not taking the column names of the excel file and giving errors.
I the flow variable I am able to see the column names and yet the flow is not able to recognize the column names.
Please can someone help me out as I am trying to make the whole thing dynamic based on the data in excel, by creating 'For each' loops.
Thank you,
Vishesh Jain
Solved! Go to Solution.
Issue here is with the file name refer below:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
Therefore, either you change the filename or use replace text at runtime to remove ':'
Hope it helps!!
Cheers,
Ankesh
--------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @jaeiow,
I am trying to do this on Power Automate Desktop and the solution you mentioned requires using the online flows.
For reasons unknown PAD is not able to recognize columns from the excel even after the read excel function is giving me the desired table.
Thank you,
Vishesh Jain
Hello,
I've tried multiple methods and for some reason I am getting the following error:
Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Can't rename file ---> System.NotSupportedException: The given path's format is not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at Microsoft.Flow.RPA.Desktop.Modules.File.Actions.RenameFilesAction.Execute(ActionContext context)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.File.Actions.RenameFilesAction.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
It is unable to recogniize or get the file path but when I copy paste the same file path in the windows explorer, it opens up the file immediately.
When I put a Display message action to display the output of the flow variable, it shows me the correct path.
Please is someone can help me.
Thank you,
Vishesh Jain
@visheshjain Please check your action 'Read from Excel Worksheet' if you have enabled below:
Hope it helps!!
Cheers,
Ankesh
--------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @Ankesh_49,
Yes I have enable the first rows as header.
I tried the same thing and I am now getting the correct FilePath when I use the Display Message.
However, when I try to use that same path in order to get the file to rename, I get an error.
If you'd like any further information then please let me know.
Thank you,
Vishesh Jain
What are the steps you are performing here in the highlighted part:
Would you mind sharing a screenshot?
Hi @Ankesh_49,
Thanks for taking the time to respond.
Here are my steps.
As you can see, the flow works fine and it displays the right message.
It is only in step 7 when I actually try to rename the files it gives an error.
Hope this helps you understand the problem better.
Thank you,
Vishesh Jain
Could you please share Rename file action screenshot. I believe its something to do with date time format in the filename or the path
Here is the Rename Files step and as you can see in the 2nd screenshot I am getting the message in the display.
The new names have been defined in the excel sheet itself and have been converted to the format text.
Thank you,
Vishesh Jain
Issue here is with the file name refer below:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
Therefore, either you change the filename or use replace text at runtime to remove ':'
Hope it helps!!
Cheers,
Ankesh
--------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @Ankesh_49,
I would have not wasted 3 days had I realized how minute the error was.
Thanks for pointing it out.
Vishesh Jain
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
43 | |
18 | |
15 | |
14 | |
13 |
User | Count |
---|---|
71 | |
36 | |
29 | |
20 | |
19 |