Skip to content

Instantly share code, notes, and snippets.

@henry-p
henry-p / slack_delete.py
Created November 30, 2017 12:55
This Python 3 script will bulk remove Slack files and offers three filters: "older than X days", "greater/smaller than X MB" and "filetypes". Just add your API token at the top of the file.
from urllib.parse import urlencode
from urllib.request import urlopen
import time
import json
import codecs
import datetime
from collections import OrderedDict
reader = codecs.getreader("utf-8")