Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

PAD "Get File Path Part" does not throw exception if path doesn't exist

After updating Power Automate Desktop to version last week, the action "Get File Path Part" changed behaviour in the sense that if a path given to it is not a valid file, any variables coming out of it come out blank, with no exception being thrown like it was on previous versions, which can lead into a debug nightmare as the flow just proceeds until it throws error somewhere else because of the empty generated variables (Directory, Filename, etc...).


In fact, in Winautomation, this action performed differently, as it, not just it didn't care if the file path given existed, but also it would work in folder paths as well, so a very easy way to navigate through long nested folder hierarchies and get parent folder names, etc (which I need very often)




running the action once would output

"FolderTwo" as "FileName" 

"C:\Users\myuser\OneDrive\Documents\folderONE as "Directory"


If you did run it again using "Directory" as the path, it would output:

"FolderONE" as "FileName" 

"C:\Users\myuser\OneDrive\Documents\ as "Directory"



This was a very easy to breakdown long nested file paths, instead of having to use splits, loops and joins, with the only drawback being that it did not check the if the path given was a valid existent file, but that could be obviously done by "If file exists" if needed.


The last version of PAD doesn't do any of this


Advocate I
Advocate I

Ok, it get's even worse...

Just seen it returning empty variables, even with a fully valid file path, just randomly. On the same valid path, sometimes it works, sometimes doesn't. 

Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Users online (2,530)