web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Can't ID folder to move it using OneDrive or SharePoint connectors

(0) ShareShare
ReportReport
Posted on by 498

I'm trying to move a OneDrive folder using a variable that is the folder name.  The variable passed is in uppercase, while the folder name is mixed case. The account running the flow is the account that owns the folder and files in it.

jiwhite_4-1666897787455.png

 

  • I can't use the OneDrive List files in folder and iterate to get the folder Id because there are too many folders in the same folder, so the one I'm looking for is not returned to search by uppercased name.
  • OneDrive Find files in folder and Find files in folder by path do not return the folder I need to move using OneDriveSearch.
    jiwhite_0-1666903975984.png
    jiwhite_1-1666897046168.png
  • OneDrive Find files in folder and Find files in folder by path do not return the folder I need using Pattern, even though I confirmed the possible regex matches for the expressions. https://regex101.com/r/sCyMvv/1
    jiwhite_0-1666902800586.png
    jiwhite_0-1666901759569.png
  • Although I'm able to use SharePoint Get file content using path to get the content of a file in the folder and email it, and SharePoint Get folder metadata using path returns the folder data, none of the IDs or the path returned work in SharePoint Move Folder Folder to Move.
    jiwhite_2-1666897160731.png
    jiwhite_3-1666897314891.png
    Failed to verify the existence of source object at 'https://xxxxxxxxx-my.sharepoint.com/personal/xxxxxxxxxxxxx/_layouts/15/onedrive.aspx/Documents/xxxx OCAP Automation/OCAPs/CMP_SLURRY V1A SLURRY, 208L DR' due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.
    clientRequestId: 154209ea-16f3-482c-ab88-15a1d465f835
    serviceRequestId: 154209ea-16f3-482c-ab88-15a1d465f835

     

    Help finding the folder using a OneDrive Connector, or successfully passing the folder to the SharePoint Move folder connector would be appreciated.
I have the same question (0)
  • grantjenkins Profile Picture
    11,059 Moderator on at
    Re: Can't ID folder to move it using OneDrive or SharePoint connectors

    I would use the SharePoint Get files (properties only) action and use the Filter Query.

     

    For this example, I have the following folder structure in OneDrive.

    grantjenkins_0-1666937206954.png

     

    And my flow is:

    grantjenkins_2-1666937275205.png

     

    For Get files (properties only) I've set it to include nested items and used the following for my filters.

    FSObjType eq 1 and FileLeafRef eq 'CMP_SLURRY V1A SLURRY, 208L DR'

    FSObjType eq 1 means only return folders (not files), and FileLeafRef refers to the actual Name of the folder (not case sensitive).

     

    The Select is just showing some of the properties you might want to use. See output for my example below:

    grantjenkins_3-1666937516111.png

    [
     {
     "ID": 133,
     "Identifier": "Documents%252fAutomation%252fFolder%2b1%252fOCAPs%252fCMP_Slurry%2bV1A%2bSLURRY%252c%2b208L%2bDR",
     "Full Path": "Documents/Automation/Folder 1/OCAPs/CMP_Slurry V1A SLURRY, 208L DR"
     }
    ]

     

  • Verified answer
    jiwhite Profile Picture
    498 on at
    Re: Can't ID folder to move it using OneDrive or SharePoint connectors

    I got the identifiers from Get folder metadata using path, but they didn't work in Move Folder. I was finally able to use OneDrive Get file metadata using path, which did a case insensitive search, and pass it to OneDrive Move or rename a file to move the folder.

    jiwhite_0-1666972518476.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard