Hi All,
I try to upload child folder to my SharePoint document library and I would like to get the child folder name and send an email together with the child folder name. Unfortunately I use "Folder Path" in flows, but it only give me the main folder name, I cannot get the child folder name.
Solved! Go to Solution.
Hi @JacksonTeo :
If your file is in a subfolder, then "Folder Path" contains the name of the subfolder. for example:
If the Full Path is
picc/SubFolder1/Document.docx
Then the folder Path should be
picc/SubFolder1/
If in this case you only want to get "SubFolder1",you could try this Expression:
split(triggerOutputs()?['body/{Path}'],'/')[sub(length(split(triggerOutputs()?['body/{Path}'],'/')),2)]
Best Regards,
Bof
Hi @JacksonTeo :
If your file is in a subfolder, then "Folder Path" contains the name of the subfolder. for example:
If the Full Path is
picc/SubFolder1/Document.docx
Then the folder Path should be
picc/SubFolder1/
If in this case you only want to get "SubFolder1",you could try this Expression:
split(triggerOutputs()?['body/{Path}'],'/')[sub(length(split(triggerOutputs()?['body/{Path}'],'/')),2)]
Best Regards,
Bof
Hi @v-bofeng-msft ,
Thanks for your reply. I tried your method, unfortunately I still get the main folder name just without a "/" at the end.
I have do some test, if I upload entire subfolder(with files) in SharePoint document library, I will keep getting the Main folder name. But If I just upload a file into my sub folder, I will get the correct folder path (main folder/sub folder).
so my question is, is it unable to get sub folder name if I upload the entire sub folder from the SharePoint Document Library?
When I upload entire folder, i will only get this
Thanks for your support!
Regards,
Jackson
Hi @v-bofeng-msft ,
Finally I figure it out. Thanks for your help. I just change the compose Expression to:
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
User | Count |
---|---|
26 | |
25 | |
23 | |
22 | |
14 |
User | Count |
---|---|
45 | |
33 | |
33 | |
32 | |
30 |