cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Level 8

Re: File Directory, not full path with filename

LOL.  This isn't the most effiecient mode of communication.  

 

Under Verify File Name (a condition), condition YES, I am invoking Add a row into Event Log (Excel insert row).  In the Source output field, I am using Expression and Dynamic Content to build the expression with these two fields.

Super User
Super User

Re: File Directory, not full path with filename

Hi @akharns ,

 

Yes the gateway connection is working for me now. So I did built a flow similar like yours but I can't see those properties in my flow action step.

In your screen shot I can see properties List of Files File Locator, List f files Id, List of Files IsFolder etc... See my properties below. So that means there is something wrong with your flow action "List Files in folder". Where does you getting the above mentioned properties from?

 

Here is my flow and flow action properties.

prop3.png

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



akharns
Level 8

Re: File Directory, not full path with filename

I don't know enough to know how List Of Files.... was created.  It's being triggered by When A File Is Created.  I wouldn't think there would be a "list of files".  

 

The odd part is that I don't get an error when using any field directly, without an expression, and I don't have a problem if I put this expression in a different output field, such as one I have called Notes.  There's something weird about that one field "source".

Super User
Super User

Re: File Directory, not full path with filename

Hi @akharns 

Thanks for your reply. In your earlier screenshot you provided the trigger was manual and now I can see where the list of files properties are coming from. I did constructed a flow. Below are the steps for getting the filename and path. 

 

ak1.png

 

 

Expressions are as follows:

 
Variable SplitFilePathAndName expression:
split(variables('FilePathAndFileName'), '\')
 
Variable Filename expression:
last(variables('SplitFilePathAndName'))
 
Variable FilePath expression:
replace(variables('FilePathAndFileName'), variables('Filename'), '')

 

Below are my test results:

re1.png

re2.png

 

re3.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



akharns
Level 8

Re: File Directory, not full path with filename

I will give this a try, but is there a reason that my solution would not work?  A simpler solution (one step instead of several) sounds like a better, if possible.

akharns
Level 8

Re: File Directory, not full path with filename

I just ran a test, using your method and mine and they produced the same results.  I am convinced that the original problem was specific to the field I was writing it to.

Super User
Super User

Re: File Directory, not full path with filename

Hi @akharns 

 

Glad to hear that it is resolved and thanks for the update.

 

If the below reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



akharns
Level 8

Re: File Directory, not full path with filename

We have shown to valid ways to compute the file's directory, but we have not solved the problem.  How can I fix Flow or my Excel table so I can populate the Source column?  I tried thought if I deleted the column and re-added it in the table, it might do it, but it did not. 

 

I conclude that it can't  be fixed.  I can add a new column to the table and start using that.  I can't name it with the old name.

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (6,236)