OneNote Gem Add-Ins

Using Command Line to Clean an OneNote Notebook or Section Group

OneNote Batch v13 offers a command line to clean an OneNote Notebook or Section Group. It will delete all subsidiaries, includes all sub section groups and sub sections.
You can use this command line to make a task to clean a section group.

For example:
There is a "Month" section group in "My Notebook" notebook, and we plan to regularly to empty it ( Delete all its sub section groups and sub sections ).
Get Command Line

In left section tree in OneNote Batch, right click on "Month" section group, on the pop up menu, click "Copy Delete Subsidiaries Command Line to This" item, it will copy the command line to clipboard, if it success, it will display "Create "Month" delete subsidiaries command line and copy to clipboard." on the status bar.

Command Line Format:
"C:Program FilesOneNoteGemNoteBatchNoteBatchProcessor.exe" /RemoveSubs {Section Group ID}
Create a Batch File

Run Windows notepad.exe, press "Ctrl + V" to paste the command line, and save the file ( file name is ClrONMonth.bat ).
Run the Batch File to Empty the Section Group

Double click on "ClrONMonth.bat" to run the batch file, it will start to empty "Month" Section Group.

We can see the sections have all been removed from "Month" Section group when we return to OneNote.

With "ClrONMonth.bat" batch file, it is easy to empty the "Month" Section Group from now.
Download OneNote Batch