logo
search
SharePoint Document Issues

How to Stop .onetoc2 Files from Generating in SharePoint Folders

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

Question details

Users are noticing that a .onetoc2 file is automatically generated whenever a new folder is created in SharePoint.

Product
SharePoint / Microsoft OneNote
Device & OS
not provided
Scenario
Managing files and folders within SharePoint Site contents.
Observed behavior
A .onetoc2 file is automatically created in newly created SharePoint folders, often originating in the General folder under Site contents > Documents.
Before you start

Ensure you have the necessary permissions in SharePoint to view who has recently modified or accessed the affected folder, as this will help identify the user who accidentally connected it to OneNote.

Solution 1Recommended

Identify and Close the OneNote Pseudo-Notebook

Since OneNote interprets the SharePoint folder as a notebook, the user who opened it must close the connection in their OneNote application.

When a SharePoint folder is opened as a OneNote notebook, OneNote treats all subfolders as section groups and automatically generates .onetoc2 index files to organize them.

1
Identify the user

Check the version history or the properties (Created By/Modified By) of the newly created .onetoc2 file in SharePoint to identify which user's OneNote application is generating the file.

2
Locate the parent folder

Trace the folder path back to the highest parent directory (for example, the General folder under Site contents > Documents) that was mistakenly opened as a notebook.

3
Close the notebook

Ask the identified user to open their desktop OneNote application, locate the pseudo-notebook synced to that SharePoint folder, right-click its name in the notebook list, and select 'Close This Notebook'.

Stop Automatic Generation: Once the folder is no longer being actively used as a OneNote notebook by any user, newly created folders will stop generating .onetoc2 files.
Free Microsoft Office alternative

Looking for a Simpler Way to Manage Documents?

If complex Microsoft Office integrations like OneNote and SharePoint are causing unexpected sync files and file management headaches, try WPS Office. It provides a lightweight, standalone, and highly compatible alternative for your document needs without hidden syncing complications.

Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight standalone design that won't create unexpected sync files in your folders.Free, straightforward, and easy to use with a familiar tabbed interface.Seamless migration from Microsoft Office for a stress-free document management experience.
microsoft office alternative - wps office

Frequently Asked Questions

What exactly is a .onetoc2 file?

A .onetoc2 file is a OneNote Table of Contents file. It is automatically created by Microsoft OneNote to keep track of the organization of sections and section groups within a notebook.

Can I safely delete the .onetoc2 files from SharePoint?

Yes, you can safely delete them if the SharePoint folder is not actually meant to be a OneNote notebook. However, they will reappear automatically if the user who originally opened the folder as a notebook does not close it in their OneNote application.

Why did my SharePoint Documents folder turn into a OneNote notebook?

This typically happens when a user accidentally clicks 'Open in OneNote' from the SharePoint interface or attempts to connect their OneNote desktop application directly to the root path of the SharePoint Documents library instead of creating a standard notebook file.