Skip to main content

Posts

Showing posts from May, 2017

Recursively deleting files in Windows

Due to a magical feature of OneNote software, one day I noticed lots of files with extension ' .onetoc2 ' in one of the folder and each of it's subfolders.  I found the below solution using wildcards with ' del' command and '/S ' switch to remove them completely and recursively -  1.   Open command prompt and go to home directory where you want to perform this operation             cd MyFiles 2.   Run the below command – del /S  *.onetoc2 PS: There's a huge difference between running del /S *. onetoc2 and del /S C:\*. onetoc2 .  The first command is executed from the current location , whereas the second is executed on the whole drive .