Skip to content

Instantly share code, notes, and snippets.

@dirk-thomas
Created January 11, 2016 17:38
Show Gist options
  • Select an option

  • Save dirk-thomas/47bc0b6a66abaca1486c to your computer and use it in GitHub Desktop.

Select an option

Save dirk-thomas/47bc0b6a66abaca1486c to your computer and use it in GitHub Desktop.
Script to move spam pages to a different location
import os
import re
for name in os.listdir('.'):
if not re.search('quickbook', name, re.IGNORECASE):
continue
print(name)
os.rename(name, '../pages_deleted/' + name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment