cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marketingandel
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
v-litu-msft
Community Support
Community Support

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
ChristianAbata
Super User II
Super User II

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
v-litu-msft
Community Support
Community Support

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

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

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (32,847)