How to Fix OneDrive Folder Sorting and Number Order Issues
Question details
The user needs to know how to force OneDrive to sort folders with numeric or date-based names in a natural, logical sequence.

- Product
- Microsoft OneDrive
- Device & OS
- not provided
- Scenario
- Organizing files and folders that use sequential numbers or dates as their titles in OneDrive.
- Observed behavior
- OneDrive sorts folder names strictly alphabetically, causing numeric sequences to appear out of order (e.g., 1, 10, 11, 2, 3) and date folders to display non-chronologically.
Before renaming your folders, determine the maximum number of digits your folder sequence will require (e.g., up to 99 requires two digits, up to 999 requires three) to ensure a consistent naming convention.
Use Leading Zeros for Numbered Folders
Add leading zeros to your folder names to force OneDrive's alphabetical system into a proper numeric sequence.
Because OneDrive relies on standard alphabetical sorting and lacks a natural numeric sorting feature, it evaluates characters sequentially from left to right. This is why '10' appears before '2'. Standardizing your folder names by padding them with zeros is the most effective workaround.
Open your OneDrive directory and locate the numbered folders that are currently out of order.
Decide on the maximum number of digits needed for your entire folder structure. For example, use a two-digit format ('01', '02') if you have fewer than 100 folders.
Right-click each folder, select 'Rename', and add the appropriate number of leading zeros so that single digits become double digits (change '1' to '01', '2' to '02').
Refresh your OneDrive view. The folders will now display sequentially from 01 to 09, followed by 10, 11, and so on.

Standardize Date Formats in Folder Names
Format dates consistently using leading zeros or an international standard structure to keep them chronologically organized.
Manage Your Documents Effectively with WPS Office
While organizing your OneDrive files, consider upgrading your document editing experience. WPS Office is a free, lightweight, and highly compatible alternative to Microsoft Office that allows you to seamlessly open, edit, and save files directly to your cloud storage.
- 1. Download the App: Visit the official WPS Office website to download the free installation package for your OS.
- 2. Install and Launch: Follow the straightforward installation wizard, then open the WPS Office application.
- 3. Open Your Files: Easily access and edit your newly organized OneDrive documents directly within WPS Office.

Frequently Asked Questions
Why does OneDrive sort '10' before '2'?
OneDrive uses alphanumeric sorting, which evaluates characters one by one from left to right. Because the first character of '10' (which is '1') comes before '2' in the alphabet and number line, '10' is placed higher on the list regardless of its true mathematical value.
Is there a setting in OneDrive to enable natural number sorting?
No, Microsoft OneDrive currently does not offer a built-in feature or toggle to enable natural numeric sorting. Renaming your folders with leading zeros remains the officially required workaround.
How should I name my folders to sort them by date in OneDrive?
The most reliable way to sort folders chronologically is to use the YYYY-MM-DD format (e.g., 2023-10-05). Because standard sorting evaluates numbers from left to right, this ensures folders are grouped correctly by year, followed by month, and then day.
Will renaming my folders break shared links in OneDrive?
Generally, if you rename a folder in OneDrive, existing shared links remain active because the system tracks the folder's unique background ID rather than its display name. However, if the folder is synced to local devices or linked to automated workflows, it is always best practice to verify connections after renaming.




