Skip to content

Instantly share code, notes, and snippets.

View isaacgr's full-sized avatar

Isaac isaacgr

  • Integrated concepts
View GitHub Profile
@isaacgr
isaacgr / extract.py
Created June 2, 2019 03:32
Script to move files out of a folder and into root directory
import shutil
import os
def main():
for root, dirs, files in os.walk(".", topdown=False):
for name in files:
if name.endswith('.bmp'):
thefile = os.path.join(root, name)
current_dir = os.getcwd()
shutil.move(thefile, current_dir)