You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Microsoft Flow中创建每日运行的OneDrive个人版文件夹移动流?是否支持移动文件夹操作?

Absolutely, you can totally build a daily automated flow to move entire folders in OneDrive Personal—let me walk you through exactly how to pull this off, since the folder-move action is easy to miss if you’re only looking at file-focused operations.

Step 1: Set Up the Daily Trigger

Start by adding the Recurrence trigger to your flow:

  • Configure it to run Once per day, and pick the specific time you want the flow to execute (e.g., 2 AM when usage is low to avoid conflicts).
Step 2: Fetch the Source Folder’s Unique ID

Power Automate relies on a folder’s unique ID for reliable moves (paths can break if folder names change), so grab this first:

  • Add the Get folder metadata action from the OneDrive Personal connector.
  • In the Folder path field, enter the full path of the folder you want to move (e.g., /Projects/Completed/2024-Q1).
  • This action will output the folder’s id—you’ll need this value for the next step.
Step 3: Use the "Move Folder" Action

Here’s the hidden gem you might have overlooked: the OneDrive Personal connector has a dedicated folder-move action:

  • Add the Move folder action (look under the "Folder" group of actions, not just file-focused options).
  • For Folder to move, select the id from the "Get folder metadata" action (use the dynamic content panel to pick this automatically).
  • For Destination folder, either enter the full path of your target folder (e.g., /Archives/Projects/2024) or fetch the target folder’s id with another "Get folder metadata" action (this is more robust if you anticipate path or name changes).
Alternative: Fallback to Graph API if Needed

If for some reason the "Move folder" action isn’t available in your environment, use the Graph API via an HTTP action:

  • Add the HTTP action.
  • Set Method to PATCH.
  • Set URI to https://graph.microsoft.com/v1.0/me/drive/items/{source-folder-id} (replace {source-folder-id} with the ID from step 2).
  • Add a header with key Content-Type and value application/json.
  • Paste this JSON in the Body (replace {target-folder-id} with your destination folder’s ID, fetched via another "Get folder metadata" action):
    {
      "parentReference": {
        "id": "{target-folder-id}"
      }
    }
    
  • Use Delegated authentication linked to your OneDrive account to ensure the request has the necessary permissions.
Quick Tips for Smooth Runs
  • Test the flow manually first to confirm the entire folder structure (including subfolders and all files inside) moves correctly.
  • Add a "Condition" action after step 2 to check if the source folder exists—this prevents failed runs if the folder is already moved or deleted.

内容的提问来源于stack exchange,提问作者Krystian

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 18:52:53