cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Nenad
Level: Powered On

OneDrive move file to folder named by part of that file's name

On create file in specific folder in OneDrive that file should be moved to another folder which name is part of file's name.
Example:
Create file root/documents/nmn-something.pdf
Move file to folder root/nmn
4 REPLIES 4
Nenad
Level: Powered On

Re: OneDrive move file to folder named by part of that file's name

I tried solution from this question https://powerusers.microsoft.com/t5/Building-Flows/When-create-file-and-approved-move-file-todirecto...

 

but i got error

"status": 400

"message": "

One or more invalid characters are present in the path (/LiveFolders/[\"YmFsa2FuLWhlai5wZGY=\"]/nmn-something.pdf)."
 
 
Community Support Team
Community Support Team

Re: OneDrive move file to folder named by part of that file's name

Hi @Nenad,

 

Could you provide a screenshot of your Flow configuration?

It seems that you have made an error while designing the folder name.

Could you provide details about it?

I am testing on my side and using Move or rename a file to move the file.

The point to note is that when configuring File Path, the path must be followed by the Display name of the file, because the path to the file is required instead of the path to the folder.

Use an expression to get a filename that does not contain extension, as a folder name.

Image reference:

61.PNG

Flow works well, as below:

62.PNG

Please take a try or provide your flow configuration and we would found the cause of the issue.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Nenad
Level: Powered On

Re: OneDrive move file to folder named by part of that file's name

Thanks @v-bacao-msft

I tried your flow but I got error something like Split expected string but got Null. It seems like triggerBody()?['Name'] does not return filename
Community Support Team
Community Support Team

Re: OneDrive move file to folder named by part of that file's name

Hi @Nenad,

 

What is your current progress? Is the configuration of your Flow the same as mine?

Or you could provide the configuration of your Flow.

I did a test on my side, triggerBody()?['Name'] is actually the output of Dynamic content - List of file Name.

12.png

The output is the name of the file:

13.PNG

Please try again.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 96 members 3,011 guests
Please welcome our newest community members: