cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How do I rename a OneDrive folder via powerapps and flow ?

Hi, I have a PA app that manipulates a bunch of strings and creates a folder name in OneDrive. Im creating a file in a folder that doesnt exist, i delete the file and Voila I have created a new folder. Now...I need to be able to change the folder name if the user changes the data in my app. For example if the user is selecting Status from a drop down =  pending , the folder name should be changed to "xxx-status_pending". Should I move everything to a new named folder or is there a better cleaner way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How do I rename a OneDrive folder via powerapps and flow ?

Hi @marketingandel,

 

Unfortunately, there is no action could rename the folder in Power Automate. As a workaround, you could follow the way you created the folder to create a new folder named contains pending, then move this file into it. However, it will produce many empty folders, so you need to figure out these empty folders after moving, and there is no action that could delete a folder in Power Automate, so it is hard to do it.

 

There is a method provided by @edgonzales, it is a way to delete the folder, 

So, here's a theory...let me know what you think:

  1. Map the OneDrive to a network drive
  2. Write a batch file to clear the drive.
  3. Call the batch file from a recurrence Flow.

Maybe it could enlighten you something.

 

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

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: How do I rename a OneDrive folder via powerapps and flow ?

hi @marketingandel  I was looking a way to rename a folder, but unfortunally does not exist, you can create a new one, or you can rename a file.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Community Support
Community Support

Re: How do I rename a OneDrive folder via powerapps and flow ?

Hi @marketingandel,

 

Unfortunately, there is no action could rename the folder in Power Automate. As a workaround, you could follow the way you created the folder to create a new folder named contains pending, then move this file into it. However, it will produce many empty folders, so you need to figure out these empty folders after moving, and there is no action that could delete a folder in Power Automate, so it is hard to do it.

 

There is a method provided by @edgonzales, it is a way to delete the folder, 

So, here's a theory...let me know what you think:

  1. Map the OneDrive to a network drive
  2. Write a batch file to clear the drive.
  3. Call the batch file from a recurrence Flow.

Maybe it could enlighten you something.

 

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

View solution in original post

Highlighted
Frequent Visitor

Re: How do I rename a OneDrive folder via powerapps and flow ?

I'll get   back to you as soon  as I try this solution

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Users online (8,037)