Skip to content

Instantly share code, notes, and snippets.

@jeangjenq
Last active March 20, 2022 07:45
Show Gist options
  • Save jeangjenq/eef5838949774d1b9fb53a181410c62a to your computer and use it in GitHub Desktop.
Save jeangjenq/eef5838949774d1b9fb53a181410c62a to your computer and use it in GitHub Desktop.
import os
from subprocess import call
#gather a list of files/directories/subdirectories
list = []
for root, directories, filenames in os.environ['OneDrive']:
for directory in directories:
list.append(os.path.join(root, directory))
for filename in filenames:
list.append(os.path.join(root, filename))
#run 'fsutil reparsepoint delete #filename' for every thing in the list
for file in list:
call(["fsutil", "reparsepoint", "delete", file])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment