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

Error in setting up automated 5 year archive

(0) ShareShare
ReportReport
Posted on by 6

I am trying to set-up an automated 5 year archive to move files not modified in 5 years from one SharePoint library to another, while retaining folder structure, and deleting folders once they become empty. (Bonus: alternatively create a link to the new archived folder location, in the original folder locations).

The odd part, is that this is only seeming to be touching folders so far. The library I am dealing with contains a lot of files also, but in looking at the results, only folders seem to be touched. One time I added in a condition ISfolder is equal to false. But then the flow didn’t do anything, as it always evaluated to false.

1.png

And for my last step (where it is failing) I have tried different variants, this two seemingly the best ones, but they are both failing:

Option1:

Option1Option1

Option2: (and that’s “File name with extension”)

Option2Option2

Both options give the same error, even though I am able to browse to the location:

 Inputs

Current Site Address

https://XXXXX.sharepoint.com/sites/Main 

File to Move

Test%252fGARY%2527S%2bFILES%252fACT%2bInstall%252fACTSTD%252fprogram%2bfiles%252fACT%252fACT%2bfor%2bWindows%252fLA%252fAct8Demo-database%2bfiles%252fReports

Destination Site Address

https://XXXXX.sharepoint.com/sites/Archive 

Destination Folder

Documents/Test/GARY'S FILES/ACT Install/ACTSTD/program files/ACT/ACT for Windows/LA/

Current error:

"Failed to verify the existence of destination location at 'https://xxxxx.sharepoint.com/sites/Archive/Documents/Test/GARY'S  FILES/ACT Install/ACTSTD/program files/ACT/ACT for Windows/LA/' due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.\r\nclientRequestId: b356bb3f-3eb3-4c72-84eb-7f5fce308542\r\nserviceRequestId: b356bb3f-3eb3-4c72-84eb-7f5fce308542"

 

I have the same question (0)
  • Gristy Profile Picture
    2,429 on at
    Re: Error in setting up automated 5 year archive

    looks like that flow action is only returning items in the root folder for you and is not recursive. I assume you have no filter on the action?

     

    You could potentially use rest api to query all files like in this example: https://sympmarc.com/2016/04/23/get-all-sharepoint-document-library-files-and-folders-at-a-serverrelativeurl-in-one-rest-call/

     

     

  • radishimo Profile Picture
    6 on at
    Re: Error in setting up automated 5 year archive

    Hmm, to my understanding it is returning items many sub folders deep. Since one of the successful actions is to create the destination folders and subfolders, I know that more than just the root folder items are being returned. I can see hundreds of folders in the destination matching the source folder hierarchy. So I believe that is working based off of that fact. Do you agree?

    One thought that I am having an issue with does resolve around that is being returned, as it seems as though only folders are being returned. Any thoughts there?

  • v-alzhan-msft Profile Picture
    on at
    Re: Error in setting up automated 5 year archive

    Hi @radishimo ,

     

    Please take a try with a existing folder path to see if the flow could work.

     

    Best regards,

    Alice       

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

  • radishimo Profile Picture
    6 on at
    Re: Error in setting up automated 5 year archive

    How would you recommend I do that? Since there are many different method, which would you propose I use for this test?

  • radishimo Profile Picture
    6 on at
    Re: Error in setting up automated 5 year archive

    I also just determined that the flow results are only showing folders being returned when I look at the body output of the Get files action (at least in the 100 results that the run history provides). Is there a different action that I should be using besides Get files (properties only)?

  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Error in setting up automated 5 year archive

    Hi @radishimo ,

     

    There in no any action could replace the Get files action.

     

    Best regards,

    Alice       

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

     

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 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard