OneDrive File Issues

How to Automatically Archive OneDrive Files by Date

Guest WriterGuest Writer Oct 10, 2026 871 views

Question details

The user wants to know how to automatically archive files in a specific OneDrive folder based on their creation or modification dates and schedule them for eventual deletion.

How to Automatically Archive OneDrive Files by Date
Product
Microsoft OneDrive
Device & OS
not provided
Scenario
Managing file lifecycles and organizing cloud storage by automatically moving older files to an archive or scheduling them for deletion.
Observed behavior
OneDrive does not have a native, built-in feature to automatically archive or delete files based on their age or modification date.
Before you start

Ensure you have an active Microsoft account with access to both OneDrive and Microsoft Power Automate, and verify that you have sufficient permissions to create automated cloud flows.

Solution 1Recommended

Use Power Automate to Create an Archiving Flow

Since OneDrive does not support native date-based archiving, you can use Microsoft Power Automate to build a scheduled flow that checks file dates and moves qualifying files to an archive folder.

Power Automate (formerly Microsoft Flow) allows you to connect different Microsoft services. By creating a scheduled flow, you can set custom parameters to evaluate the creation or modification dates of files within a designated OneDrive folder and automate their relocation.

1
Log into Power Automate

Go to the Microsoft Power Automate website and sign in with your Microsoft account credentials.

2
Create a Scheduled Flow

Click on 'Create' in the left sidebar and select 'Scheduled cloud flow'. Name your flow and set the frequency (e.g., daily or weekly) for when the archive check should run.

3
List Files in Folder

Add a new step and search for the 'OneDrive for Business' or 'OneDrive' connector. Select the 'List files in folder' action and specify the path to the folder you want to monitor.

4
Filter Files by Date

Add an 'Apply to each' control to loop through the listed files. Inside the loop, add a 'Condition' to check if the 'Last modified' or 'Created' date is older than your specific archiving threshold (using expressions like 'addDays').

5
Move Qualifying Files

In the 'If yes' branch of your condition, add the 'Move or rename a file' action. Specify the dynamic file ID and set the destination path to your designated archive folder.

Use Power Automate to Create an Archiving Flow
Scheduling Deletion: To automatically delete these files later, you can create a secondary Power Automate flow targeting the archive folder, substituting the 'Move' action with a 'Delete file' action for files that exceed your final retention date.
Free Microsoft Office alternative

Try WPS Office for Your Document Management Needs

While you set up your OneDrive automations for file archiving, consider using WPS Office for your daily document creation. It is a free, lightweight, and highly capable alternative to Microsoft Office that offers a familiar interface, seamless migration, and robust file compatibility.

  1. 1. Download WPS Office: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Application: Run the downloaded installer file and follow the simple on-screen instructions to set up the software.
  3. 3. Edit Your Cloud Files: Launch WPS Office, open your Microsoft Office format files, and enjoy a seamless editing experience.
Seamless compatibility with all standard Microsoft Office file formats (.docx, .xlsx, .pptx).Free and lightweight software that installs quickly and will not slow down your device.Familiar tabbed user interface, ensuring a zero-learning-curve transition from other office suites.Built-in tools to easily manage, edit, and organize your files across various cloud storage platforms.
microsoft office alternative - wps office

Frequently Asked Questions

Does OneDrive have a built-in auto-archive feature?

No, OneDrive does not natively offer a built-in setting to automatically archive or delete files based on their creation or modification dates. You must use Microsoft Power Automate to achieve this.

Can I automatically delete old files in OneDrive?

Yes, but it requires setting up a scheduled workflow in Power Automate. You can configure a flow to scan a folder and use the 'Delete file' action for any files older than a specified number of days.

Is Power Automate free to use with OneDrive?

Power Automate offers a free tier that is included with most standard Microsoft accounts. This tier is generally sufficient for basic personal OneDrive file management flows, though advanced integrations may require a premium subscription.